Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 10 pull requests #110359

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ae1a1ef
rustdoc: use a template to generate Hrefs
jsha Mar 17, 2023
af3bf85
Add 1.69.0 release notes
cuviper Apr 7, 2023
21f10dd
Cargo only suggests fixes for warnings
cuviper Apr 7, 2023
6b33156
`core::net` is not stable yet
cuviper Apr 7, 2023
f6a47f3
Rephrase the analysis removal
cuviper Apr 7, 2023
c21b104
Remove empty "Misc" section
cuviper Apr 7, 2023
361b453
Avoid normalization/projection jargon
cuviper Apr 7, 2023
02b3165
Apply code formatting
cuviper Apr 7, 2023
5badbef
drop some windows features
klensy Apr 12, 2023
f9f2516
Apply suggestions from code review
cuviper Apr 12, 2023
c9358e9
Apply suggestions from code review
cuviper Apr 12, 2023
ae60b36
Cargo '-C' was reverted
cuviper Apr 12, 2023
ecf2a9b
fix: skip implied bounds if unconstrained lifetime exists
Ezrashaw Apr 13, 2023
617648c
Update the mingw version note
cuviper Apr 13, 2023
0aa958b
Allow everyone to set the beta-nominated label
est31 Apr 14, 2023
b506d96
implement review suggestions
Ezrashaw Apr 14, 2023
1410337
Use same `FxHashMap` in `rustdoc-json-types` and `librustdoc`.
aDotInTheVoid Apr 7, 2023
578aedd
bump to rust 1.71.0
pietroalbini Apr 15, 2023
714c276
add UI test for #79605
SparkyPotato Apr 15, 2023
504a47b
Add intra-doc links to size_of_* functions
est31 Apr 15, 2023
4c80f58
Update compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
aliemjay Apr 15, 2023
b1feb45
Fix `x test rust-installer` when `cargo` is set to a relative path
jyn514 Apr 15, 2023
e90149a
Rollup merge of #109616 - jsha:href-template, r=notriddle
aliemjay Apr 15, 2023
cd869cb
Rollup merge of #110033 - cuviper:relnotes-1.69.0, r=pietroalbini
aliemjay Apr 15, 2023
1462cb6
Rollup merge of #110051 - aDotInTheVoid:rdj-hashmap, r=jyn514
aliemjay Apr 15, 2023
1e2b613
Rollup merge of #110227 - klensy:bs-win, r=Mark-Simulacrum
aliemjay Apr 15, 2023
b0ebbc6
Rollup merge of #110272 - Ezrashaw:fix-unconned-lt-in-implbounds, r=a…
aliemjay Apr 15, 2023
0bbf3fb
Rollup merge of #110307 - est31:beta_nominated_unauthenticated, r=Mar…
aliemjay Apr 15, 2023
cccc358
Rollup merge of #110347 - est31:size_of_links, r=jyn514
aliemjay Apr 15, 2023
75e2634
Rollup merge of #110349 - rust-lang:pa-bump-1.71.0, r=pietroalbini
aliemjay Apr 15, 2023
2cd8348
Rollup merge of #110350 - SparkyPotato:test-79605, r=cjgillot
aliemjay Apr 15, 2023
86ff9cd
Rollup merge of #110356 - jyn514:rust-installer-tests, r=ozkanonur
aliemjay Apr 15, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2900,7 +2900,6 @@ dependencies = [
"anyhow",
"clap 4.2.1",
"fs-err",
"rustc-hash",
"rustdoc-json-types",
"serde",
"serde_json",
Expand Down Expand Up @@ -5543,7 +5542,6 @@ dependencies = [
name = "rustdoc-json-types"
version = "0.1.0"
dependencies = [
"rustc-hash",
"serde",
"serde_json",
]
Expand Down
102 changes: 102 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,105 @@
Version 1.69.0 (2023-04-20)
==========================

<a id="1.69.0-Language"></a>

Language
--------

- [Deriving built-in traits on packed structs works with `Copy` fields.](https://github.com/rust-lang/rust/pull/104429/)
- [Stabilize the `cmpxchg16b` target feature on x86 and x86_64.](https://github.com/rust-lang/rust/pull/106774/)
- [Improve analysis of trait bounds for associated types.](https://github.com/rust-lang/rust/pull/103695/)
- [Allow associated types to be used as union fields.](https://github.com/rust-lang/rust/pull/106938/)
- [Allow `Self: Autotrait` bounds on dyn-safe trait methods.](https://github.com/rust-lang/rust/pull/107082/)
- [Treat `str` as containing `[u8]` for auto trait purposes.](https://github.com/rust-lang/rust/pull/107941/)

<a id="1.69.0-Compiler"></a>

Compiler
--------

- [Upgrade `*-pc-windows-gnu` on CI to mingw-w64 v10 and GCC 12.2.](https://github.com/rust-lang/rust/pull/100178/)
- [Rework min_choice algorithm of member constraints.](https://github.com/rust-lang/rust/pull/105300/)
- [Support `true` and `false` as boolean flags in compiler arguments.](https://github.com/rust-lang/rust/pull/107043/)
- [Default `repr(C)` enums to `c_int` size.](https://github.com/rust-lang/rust/pull/107592/)

<a id="1.69.0-Libraries"></a>

Libraries
---------

- [Implement the unstable `DispatchFromDyn` for cell types, allowing downstream experimentation with custom method receivers.](https://github.com/rust-lang/rust/pull/97373/)
- [Document that `fmt::Arguments::as_str()` may return `Some(_)` in more cases after optimization, subject to change.](https://github.com/rust-lang/rust/pull/106823/)
- [Implement `AsFd` and `AsRawFd` for `Rc`.](https://github.com/rust-lang/rust/pull/107317/)

<a id="1.69.0-Stabilized-APIs"></a>

Stabilized APIs
---------------

- [`CStr::from_bytes_until_nul`](https://doc.rust-lang.org/stable/core/ffi/struct.CStr.html#method.from_bytes_until_nul)
- [`core::ffi::FromBytesUntilNulError`](https://doc.rust-lang.org/stable/core/ffi/struct.FromBytesUntilNulError.html)

These APIs are now stable in const contexts:

- [`SocketAddr::new`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.new)
- [`SocketAddr::ip`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.ip)
- [`SocketAddr::port`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.port)
- [`SocketAddr::is_ipv4`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.is_ipv4)
- [`SocketAddr::is_ipv6`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.is_ipv6)
- [`SocketAddrV4::new`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.new)
- [`SocketAddrV4::ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.ip)
- [`SocketAddrV4::port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.port)
- [`SocketAddrV6::new`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.new)
- [`SocketAddrV6::ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.ip)
- [`SocketAddrV6::port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.port)
- [`SocketAddrV6::flowinfo`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.flowinfo)
- [`SocketAddrV6::scope_id`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.scope_id)

<a id="1.69.0-Cargo"></a>

Cargo
-----

- [Cargo now suggests `cargo fix` or `cargo clippy --fix` when compilation warnings are auto-fixable.](https://github.com/rust-lang/cargo/pull/11558/)
- [Cargo now suggests `cargo add` if you try to install a library crate.](https://github.com/rust-lang/cargo/pull/11410/)
- [Cargo now sets the `CARGO_BIN_NAME` environment variable also for binary examples.](https://github.com/rust-lang/cargo/pull/11705/)

<a id="1.69.0-Rustdoc"></a>

Rustdoc
-----

- [Vertically compact trait bound formatting.](https://github.com/rust-lang/rust/pull/102842/)
- [Only include stable lints in `rustdoc::all` group.](https://github.com/rust-lang/rust/pull/106316/)
- [Compute maximum Levenshtein distance based on the query.](https://github.com/rust-lang/rust/pull/107141/)
- [Remove inconsistently-present sidebar tooltips.](https://github.com/rust-lang/rust/pull/107490/)
- [Search by macro when query ends with `!`.](https://github.com/rust-lang/rust/pull/108143/)

<a id="1.69.0-Compatibility-Notes"></a>

Compatibility Notes
-------------------

- [The `rust-analysis` component from `rustup` now only contains a warning placeholder.](https://github.com/rust-lang/rust/pull/101841/) This was primarily intended for RLS, and the corresponding `-Zsave-analysis` flag has been removed from the compiler as well.
- [Unaligned references to packed fields are now a hard error.](https://github.com/rust-lang/rust/pull/102513/) This has been a warning since 1.53, and denied by default with a future-compatibility warning since 1.62.
- [Update the minimum external LLVM to 14.](https://github.com/rust-lang/rust/pull/107573/)
- [Cargo now emits errors on invalid characters in a registry token.](https://github.com/rust-lang/cargo/pull/11600/)
- [When `default-features` is set to false of a workspace dependency, and an inherited dependency of a member has `default-features = true`, Cargo will enable default features of that dependency.](https://github.com/rust-lang/cargo/pull/11409/)
- [Cargo denies `CARGO_HOME` in the `[env]` configuration table. Cargo itself doesn't pick up this value, but recursive calls to cargo would, which was not intended.](https://github.com/rust-lang/cargo/pull/11644/)
- [Debuginfo for build dependencies is now off if not explicitly set. This is expected to improve the overall build time.](https://github.com/rust-lang/cargo/pull/11252/)

<a id="1.69.0-Internal-Changes"></a>

Internal Changes
----------------

These changes do not affect any public interfaces of Rust, but they represent
significant improvements to the performance or internals of rustc and related
tools.

- [Move `format_args!()` into AST (and expand it during AST lowering)](https://github.com/rust-lang/rust/pull/106745/)

Version 1.68.2 (2023-03-28)
===========================

Expand Down
13 changes: 12 additions & 1 deletion compiler/rustc_trait_selection/src/traits/outlives_bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,18 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> {
) -> Vec<OutlivesBound<'tcx>> {
let ty = self.resolve_vars_if_possible(ty);
let ty = OpportunisticRegionResolver::new(self).fold_ty(ty);
assert!(!ty.needs_infer());

// We do not expect existential variables in implied bounds.
// We may however encounter unconstrained lifetime variables in invalid
// code. See #110161 for context.
assert!(!ty.has_non_region_infer());
if ty.needs_infer() {
self.tcx.sess.delay_span_bug(
self.tcx.def_span(body_id),
"skipped implied_outlives_bounds due to unconstrained lifetimes",
);
return vec![];
}

let span = self.tcx.def_span(body_id);
let result = param_env
Expand Down
19 changes: 13 additions & 6 deletions library/core/src/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub fn forget_unsized<T: ?Sized>(t: T) {
///
/// The following table gives the size for primitives.
///
/// Type | size_of::\<Type>()
/// Type | `size_of::<Type>()`
/// ---- | ---------------
/// () | 0
/// bool | 1
Expand All @@ -190,8 +190,8 @@ pub fn forget_unsized<T: ?Sized>(t: T) {
///
/// Furthermore, `usize` and `isize` have the same size.
///
/// The types `*const T`, `&T`, `Box<T>`, `Option<&T>`, and `Option<Box<T>>` all have
/// the same size. If `T` is Sized, all of those types have the same size as `usize`.
/// The types [`*const T`], `&T`, [`Box<T>`], [`Option<&T>`], and `Option<Box<T>>` all have
/// the same size. If `T` is `Sized`, all of those types have the same size as `usize`.
///
/// The mutability of a pointer does not change its size. As such, `&T` and `&mut T`
/// have the same size. Likewise for `*const T` and `*mut T`.
Expand All @@ -203,7 +203,7 @@ pub fn forget_unsized<T: ?Sized>(t: T) {
///
/// ## Size of Structs
///
/// For `structs`, the size is determined by the following algorithm.
/// For `struct`s, the size is determined by the following algorithm.
///
/// For each field in the struct ordered by declaration order:
///
Expand Down Expand Up @@ -299,6 +299,10 @@ pub fn forget_unsized<T: ?Sized>(t: T) {
/// ```
///
/// [alignment]: align_of
/// [`*const T`]: primitive@pointer
/// [`Box<T>`]: ../../std/boxed/struct.Box.html
/// [`Option<&T>`]: crate::option::Option
///
#[inline(always)]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
Expand All @@ -311,7 +315,7 @@ pub const fn size_of<T>() -> usize {

/// Returns the size of the pointed-to value in bytes.
///
/// This is usually the same as `size_of::<T>()`. However, when `T` *has* no
/// This is usually the same as [`size_of::<T>()`]. However, when `T` *has* no
/// statically-known size, e.g., a slice [`[T]`][slice] or a [trait object],
/// then `size_of_val` can be used to get the dynamically-known size.
///
Expand All @@ -328,6 +332,8 @@ pub const fn size_of<T>() -> usize {
/// let y: &[u8] = &x;
/// assert_eq!(13, mem::size_of_val(y));
/// ```
///
/// [`size_of::<T>()`]: size_of
#[inline]
#[must_use]
#[stable(feature = "rust1", since = "1.0.0")]
Expand All @@ -340,7 +346,7 @@ pub const fn size_of_val<T: ?Sized>(val: &T) -> usize {

/// Returns the size of the pointed-to value in bytes.
///
/// This is usually the same as `size_of::<T>()`. However, when `T` *has* no
/// This is usually the same as [`size_of::<T>()`]. However, when `T` *has* no
/// statically-known size, e.g., a slice [`[T]`][slice] or a [trait object],
/// then `size_of_val_raw` can be used to get the dynamically-known size.
///
Expand All @@ -363,6 +369,7 @@ pub const fn size_of_val<T: ?Sized>(val: &T) -> usize {
/// [`size_of_val`] on a reference to a type with an extern type tail.
/// - otherwise, it is conservatively not allowed to call this function.
///
/// [`size_of::<T>()`]: size_of
/// [trait object]: ../../book/ch17-02-trait-objects.html
/// [extern type]: ../../unstable-book/language-features/extern-types.html
///
Expand Down
4 changes: 0 additions & 4 deletions src/bootstrap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,9 @@ version = "0.46.0"
features = [
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_Diagnostics_Debug",
"Win32_System_IO",
"Win32_System_Ioctl",
"Win32_System_JobObjects",
"Win32_System_ProcessStatus",
"Win32_System_SystemServices",
"Win32_System_Threading",
"Win32_System_Time",
]
Expand Down
4 changes: 3 additions & 1 deletion src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,9 @@ impl Config {
});
config.initial_cargo = build
.cargo
.map(PathBuf::from)
.map(|cargo| {
t!(PathBuf::from(cargo).canonicalize(), "`initial_cargo` not found on disk")
})
.unwrap_or_else(|| config.out.join(config.build.triple).join("stage0/bin/cargo"));

// NOTE: it's important this comes *after* we set `initial_rustc` just above.
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ itertools = "0.10.1"
minifier = "0.2.2"
once_cell = "1.10.0"
regex = "1"
rustdoc-json-types = { path = "../rustdoc-json-types" }
rustdoc-json-types = { path = "../rustdoc-json-types", features = ["rustc_hash"] }
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
smallvec = "1.8.1"
Expand Down
3 changes: 2 additions & 1 deletion src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,8 @@ impl Item {
.iter()
.filter_map(|ItemLink { link: s, link_text, page_id: id, ref fragment }| {
debug!(?id);
if let Ok((mut href, ..)) = href(*id, cx) {
if let Ok((href, ..)) = href(*id, cx) {
let mut href = href.render_string();
debug!(?href);
if let Some(ref fragment) = *fragment {
fragment.render(&mut href, cx.tcx())
Expand Down
Loading