From 79348f49792cb4831a57ca817792ab72308d9325 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 18 Mar 2021 05:25:47 +0900 Subject: [PATCH 01/12] `cargo update -p parking_lot -p parking_lot_core` Changelog: https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md#parking_lot_core-083-2021-02-12 The full log: ``` Removing cloudabi v0.1.0 Updating parking_lot v0.11.0 -> v0.11.1 Updating parking_lot_core v0.8.0 -> v0.8.3 ``` --- Cargo.lock | 22 ++++++---------------- src/tools/tidy/src/deps.rs | 2 -- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 203d8acb5b470..757cd29ac80a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -613,15 +613,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "cloudabi" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" -dependencies = [ - "bitflags", -] - [[package]] name = "cmake" version = "0.1.44" @@ -2492,9 +2483,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", "lock_api", @@ -2503,15 +2494,14 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" dependencies = [ - "cfg-if 0.1.10", - "cloudabi", + "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.1.57", + "redox_syscall 0.2.5", "smallvec 1.6.1", "winapi 0.3.9", ] diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs index 06dc16f767660..5ec2fb6ca7901 100644 --- a/src/tools/tidy/src/deps.rs +++ b/src/tools/tidy/src/deps.rs @@ -32,7 +32,6 @@ const EXCEPTIONS: &[(&str, &str)] = &[ ("fuchsia-zircon", "BSD-3-Clause"), // rustdoc, rustc, cargo (jobserver & tempdir) ("colored", "MPL-2.0"), // rustfmt ("ordslice", "Apache-2.0"), // rls - ("cloudabi", "BSD-2-Clause"), // (rls -> crossbeam-channel 0.2 -> rand 0.5) ("ryu", "Apache-2.0 OR BSL-1.0"), // rls/cargo/... (because of serde) ("bytesize", "Apache-2.0"), // cargo ("im-rc", "MPL-2.0+"), // cargo @@ -76,7 +75,6 @@ const PERMITTED_DEPENDENCIES: &[&str] = &[ "cfg-if", "chalk-derive", "chalk-ir", - "cloudabi", "cmake", "compiler_builtins", "cpuid-bool", From 2b0e27e2423bfa4e878390afaafd47e72ae0c30b Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 18 Mar 2021 05:34:05 +0900 Subject: [PATCH 02/12] `cargo update -p bytecount` Commit range: https://github.com/llogiq/bytecount/compare/b0f5fba8069b993b251a95473910853eff0b888b...8dcd43753cde591fc10dab6e54be3e2fc6e938ce The full log: ``` Updating bytecount v0.6.0 -> v0.6.2 Adding libm v0.1.4 Removing packed_simd v0.3.3 Adding packed_simd_2 v0.3.4 ``` --- Cargo.lock | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 757cd29ac80a3..4a4335ba498fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -252,11 +252,11 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytecount" -version = "0.6.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0017894339f586ccb943b01b9555de56770c11cda818e7e3d8bd93f4ed7f46e" +checksum = "72feb31ffc86498dacdbd0fcebb56138e7177a8cc5cea4516031d15ae85a742e" dependencies = [ - "packed_simd", + "packed_simd_2", ] [[package]] @@ -1901,6 +1901,12 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "libm" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" + [[package]] name = "libnghttp2-sys" version = "0.1.4+1.41.0" @@ -2435,12 +2441,13 @@ dependencies = [ ] [[package]] -name = "packed_simd" -version = "0.3.3" +name = "packed_simd_2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85ea9fc0d4ac0deb6fe7911d38786b32fc11119afd9e9d38b84ff691ce64220" +checksum = "3278e0492f961fd4ae70909f56b2723a7e8d01a228427294e19cdfdebda89a17" dependencies = [ "cfg-if 0.1.10", + "libm", ] [[package]] From addf680cbd9167eccbf8518039e53a10b3b68dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Sat, 20 Mar 2021 00:00:00 +0000 Subject: [PATCH 03/12] Use a single codegen unit to reduce non-determinism in srcloc.rs test When building with multiple codegen units the test case can fail with only a subset of all errors. Use a single codegen unit as a workaround. --- src/test/ui/asm/srcloc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ui/asm/srcloc.rs b/src/test/ui/asm/srcloc.rs index 1477e3dd5665c..7262064e7bbee 100644 --- a/src/test/ui/asm/srcloc.rs +++ b/src/test/ui/asm/srcloc.rs @@ -1,7 +1,7 @@ // no-system-llvm // only-x86_64 // build-fail - +// compile-flags: -Ccodegen-units=1 #![feature(asm)] // Checks that inline asm errors are mapped to the correct line in the source code. From 3d64f8d475d701a36971cb416e49b80449988f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mi=C4=85sko?= Date: Mon, 8 Mar 2021 00:00:00 +0000 Subject: [PATCH 04/12] Join test thread to make assertion effective in sym.rs test case --- src/test/ui/asm/sym.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ui/asm/sym.rs b/src/test/ui/asm/sym.rs index 9931697e4129c..d5c03a7d567ba 100644 --- a/src/test/ui/asm/sym.rs +++ b/src/test/ui/asm/sym.rs @@ -76,5 +76,5 @@ fn main() { std::thread::spawn(|| { assert_eq!(static_addr!(S1), &S1 as *const u32); assert_eq!(static_tls_addr!(S2), &S2 as *const u32); - }); + }).join().unwrap(); } From ae8ef70a499907c929f5d7ad6539cd1187da336b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= Date: Sun, 21 Mar 2021 14:27:22 +0300 Subject: [PATCH 05/12] Simplify and fix byte skipping in format! string parser Fixes '\\' handling in format strings. Fixes #83340 --- compiler/rustc_parse_format/src/lib.rs | 23 +++++++++-------------- src/test/ui/macros/issue-83340.rs | 8 ++++++++ src/test/ui/macros/issue-83340.stderr | 8 ++++++++ 3 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 src/test/ui/macros/issue-83340.rs create mode 100644 src/test/ui/macros/issue-83340.stderr diff --git a/compiler/rustc_parse_format/src/lib.rs b/compiler/rustc_parse_format/src/lib.rs index 92d974690b514..e20fc28e794cc 100644 --- a/compiler/rustc_parse_format/src/lib.rs +++ b/compiler/rustc_parse_format/src/lib.rs @@ -735,25 +735,24 @@ fn find_skips_from_snippet( }; fn find_skips(snippet: &str, is_raw: bool) -> Vec { - let mut eat_ws = false; let mut s = snippet.char_indices().peekable(); let mut skips = vec![]; while let Some((pos, c)) = s.next() { match (c, s.peek()) { // skip whitespace and empty lines ending in '\\' ('\\', Some((next_pos, '\n'))) if !is_raw => { - eat_ws = true; skips.push(pos); skips.push(*next_pos); let _ = s.next(); - } - ('\\', Some((next_pos, '\n' | 'n' | 't'))) if eat_ws => { - skips.push(pos); - skips.push(*next_pos); - let _ = s.next(); - } - (' ' | '\n' | '\t', _) if eat_ws => { - skips.push(pos); + + while let Some((pos, c)) = s.peek() { + if matches!(c, ' ' | '\n' | '\t') { + skips.push(*pos); + let _ = s.next(); + } else { + break; + } + } } ('\\', Some((next_pos, 'n' | 't' | 'r' | '0' | '\\' | '\'' | '\"'))) => { skips.push(*next_pos); @@ -804,10 +803,6 @@ fn find_skips_from_snippet( } } } - _ if eat_ws => { - // `take_while(|c| c.is_whitespace())` - eat_ws = false; - } _ => {} } } diff --git a/src/test/ui/macros/issue-83340.rs b/src/test/ui/macros/issue-83340.rs new file mode 100644 index 0000000000000..d26200295cdcf --- /dev/null +++ b/src/test/ui/macros/issue-83340.rs @@ -0,0 +1,8 @@ +// check-fail + +fn main() { + println!( + "\ +\n {} │", //~ ERROR: 1 positional argument in format string, but no arguments were given + ); +} diff --git a/src/test/ui/macros/issue-83340.stderr b/src/test/ui/macros/issue-83340.stderr new file mode 100644 index 0000000000000..1935de02b57a9 --- /dev/null +++ b/src/test/ui/macros/issue-83340.stderr @@ -0,0 +1,8 @@ +error: 1 positional argument in format string, but no arguments were given + --> $DIR/issue-83340.rs:6:4 + | +LL | \n {} │", + | ^^ + +error: aborting due to previous error + From 18748c9121f5910075ca4317a78ef11adb639263 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Mon, 22 Mar 2021 15:14:24 -0400 Subject: [PATCH 06/12] Make # format easier to discover --- library/alloc/src/fmt.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/alloc/src/fmt.rs b/library/alloc/src/fmt.rs index f9424b1d74744..8453f694e1e47 100644 --- a/library/alloc/src/fmt.rs +++ b/library/alloc/src/fmt.rs @@ -19,6 +19,10 @@ //! format!("{value}", value=4); // => "4" //! format!("{} {}", 1, 2); // => "1 2" //! format!("{:04}", 42); // => "0042" with leading zeros +//! format!("{:#?}", (100, 200)); // => "( +//! // 100, +//! // 200, +//! // )" //! ``` //! //! From these, you can see that the first argument is a format string. It is @@ -163,7 +167,7 @@ //! * `-` - Currently not used //! * `#` - This flag indicates that the "alternate" form of printing should //! be used. The alternate forms are: -//! * `#?` - pretty-print the [`Debug`] formatting +//! * `#?` - pretty-print the [`Debug`] formatting (newline and indent) //! * `#x` - precedes the argument with a `0x` //! * `#X` - precedes the argument with a `0x` //! * `#b` - precedes the argument with a `0b` From 93737dc634f42d07441db2acf26a88ae2e888d9f Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Mon, 22 Mar 2021 17:09:11 -0400 Subject: [PATCH 07/12] Update library/alloc/src/fmt.rs --- library/alloc/src/fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/alloc/src/fmt.rs b/library/alloc/src/fmt.rs index 8453f694e1e47..e765fa9d14cc5 100644 --- a/library/alloc/src/fmt.rs +++ b/library/alloc/src/fmt.rs @@ -167,7 +167,7 @@ //! * `-` - Currently not used //! * `#` - This flag indicates that the "alternate" form of printing should //! be used. The alternate forms are: -//! * `#?` - pretty-print the [`Debug`] formatting (newline and indent) +//! * `#?` - pretty-print the [`Debug`] formatting (adds linebreaks and indentation) //! * `#x` - precedes the argument with a `0x` //! * `#X` - precedes the argument with a `0x` //! * `#b` - precedes the argument with a `0b` From b3ae90b4c20ae28c5dc1c141997869f9fd3148a6 Mon Sep 17 00:00:00 2001 From: Camelid Date: Tue, 23 Mar 2021 17:20:12 -0700 Subject: [PATCH 08/12] Tell GitHub to highlight `config.toml.example` as TOML This should be a nice small quality of life improvement when looking at `config.toml.example` on GitHub or looking at diffs of it in PRs. --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index d29c15fe712f3..51a670b5fbefd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,6 +9,7 @@ src/etc/installer/gfx/* binary src/vendor/** -text Cargo.lock linguist-generated=false +config.toml.example linguist-language=TOML # Older git versions try to fix line endings on images and fonts, this prevents it. *.png binary From 4590d544cc1a2a3f36a09c2c5e75bba1ad97cfdf Mon Sep 17 00:00:00 2001 From: JohnTitor Date: Fri, 26 Mar 2021 14:32:19 +0900 Subject: [PATCH 09/12] Use the direct link to the platform support page --- RELEASES.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/RELEASES.md b/RELEASES.md index dfb21ed838063..a994cc781ab7d 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -35,7 +35,7 @@ Compiler - [Added tier 3 support for `i386-unknown-linux-gnu` and `i486-unknown-linux-gnu` targets.][80662] - [The `target-cpu=native` option will now detect individual features of CPUs.][80749] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -183,7 +183,7 @@ Compiler - [The `x86_64-unknown-freebsd` is now built with the full toolset.][79484] - [Dropped support for all cloudabi targets.][78439] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -360,7 +360,7 @@ Compiler - [Output from threads spawned in tests is now captured.][78227] - [Change os and vendor values to "none" and "unknown" for some targets][78951] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -465,7 +465,7 @@ Compiler Note: If you're using cargo you must explicitly pass the `--target` flag. - [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -604,7 +604,7 @@ Compiler - [Upgrade the FreeBSD toolchain to version 11.4][75204] - [`RUST_BACKTRACE`'s output is now more compact.][75048] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -889,7 +889,7 @@ Compiler - [Added tier 3 support for the `thumbv7a-uwp-windows-msvc` target.][72133] - [Upgraded to LLVM 10.][67759] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. @@ -1398,7 +1398,7 @@ Compiler pointing to the location where they were called, rather than `core`'s internals. ][67887] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -1496,7 +1496,7 @@ Compiler - [You can now provide `--extern` flag without a path, indicating that it is available from the search path or specified with an `-L` flag.][64882] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. [argfile-docs]: https://doc.rust-lang.org/nightly/rustc/command-line-arguments.html#path-load-command-line-flags-from-a-path @@ -1620,7 +1620,7 @@ Compiler - [Added tier 3 support for the `mips64-unknown-linux-muslabi64`, and `mips64el-unknown-linux-muslabi64` targets.][65843] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -1770,7 +1770,7 @@ Compiler output of successful tests.][62600] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -1864,7 +1864,7 @@ Compiler - [Added tier 3 support for the `riscv32i-unknown-none-elf` target.][62784] - [Upgraded to LLVM 9.][62592] -\* Refer to Rust's [platform support page][forge-platform-support] for more +\* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries @@ -1951,7 +1951,7 @@ Compatibility Notes [`Duration::mul_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f32 [`Duration::mul_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f64 [`any::type_name`]: https://doc.rust-lang.org/std/any/fn.type_name.html -[forge-platform-support]: https://forge.rust-lang.org/release/platform-support.html +[platform-support-doc]: https://doc.rust-lang.org/nightly/rustc/platform-support.html [pipeline-internals]: https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199 Version 1.37.0 (2019-08-15) From 656f6ac975d3b8af6e780f1bc02e826e1629ed6a Mon Sep 17 00:00:00 2001 From: 12101111 Date: Fri, 26 Mar 2021 17:29:52 +0800 Subject: [PATCH 10/12] Handle llvm_version with suffix like "12.0.0libcxx" --- src/tools/compiletest/src/header.rs | 6 +++++- src/tools/compiletest/src/tests.rs | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index ff0d845be937c..83ea676e8f4ee 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -973,7 +973,11 @@ fn parse_normalization_string(line: &mut &str) -> Option { } pub fn extract_llvm_version(version: &str) -> Option { - let version_without_suffix = version.trim_end_matches("git").split('-').next().unwrap(); + let pat = |c: char| !c.is_ascii_digit() && c != '.'; + let version_without_suffix = match version.find(pat) { + Some(pos) => &version[..pos], + None => version, + }; let components: Vec = version_without_suffix .split('.') .map(|s| s.parse().expect("Malformed version component")) diff --git a/src/tools/compiletest/src/tests.rs b/src/tools/compiletest/src/tests.rs index ea9bc1c1a5b7f..233f2e648dc94 100644 --- a/src/tools/compiletest/src/tests.rs +++ b/src/tools/compiletest/src/tests.rs @@ -68,4 +68,8 @@ fn test_extract_llvm_version() { assert_eq!(extract_llvm_version("9.0.1-rust-1.43.0-dev"), Some(90001)); assert_eq!(extract_llvm_version("9.3.1-rust-1.43.0-dev"), Some(90301)); assert_eq!(extract_llvm_version("10.0.0-rust"), Some(100000)); + assert_eq!(extract_llvm_version("11.1.0"), Some(110100)); + assert_eq!(extract_llvm_version("12.0.0libcxx"), Some(120000)); + assert_eq!(extract_llvm_version("12.0.0-rc3"), Some(120000)); + assert_eq!(extract_llvm_version("13.0.0git"), Some(130000)); } From 147316a09449b35737d2d1af8987a1da375efe22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Fri, 26 Mar 2021 19:44:06 +0100 Subject: [PATCH 11/12] Document that the SocketAddr memory representation is not stable --- library/std/src/net/addr.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/library/std/src/net/addr.rs b/library/std/src/net/addr.rs index 63de87128340f..55546a5b03771 100644 --- a/library/std/src/net/addr.rs +++ b/library/std/src/net/addr.rs @@ -57,7 +57,8 @@ pub enum SocketAddr { /// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses. /// /// The size of a `SocketAddrV4` struct may vary depending on the target operating -/// system. +/// system. Do not assume that this type has the same memory layout as the underlying +/// system representation. /// /// [IETF RFC 793]: https://tools.ietf.org/html/rfc793 /// [`IPv4` address]: Ipv4Addr @@ -76,6 +77,8 @@ pub enum SocketAddr { #[derive(Copy)] #[stable(feature = "rust1", since = "1.0.0")] pub struct SocketAddrV4 { + // Do not assume that this struct is implemented as the underlying system representation. + // The memory layout is not part of the stable interface that std exposes. inner: c::sockaddr_in, } @@ -88,7 +91,8 @@ pub struct SocketAddrV4 { /// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses. /// /// The size of a `SocketAddrV6` struct may vary depending on the target operating -/// system. +/// system. Do not assume that this type has the same memory layout as the underlying +/// system representation. /// /// [IETF RFC 2553, Section 3.3]: https://tools.ietf.org/html/rfc2553#section-3.3 /// [`IPv6` address]: Ipv6Addr @@ -107,6 +111,8 @@ pub struct SocketAddrV4 { #[derive(Copy)] #[stable(feature = "rust1", since = "1.0.0")] pub struct SocketAddrV6 { + // Do not assume that this struct is implemented as the underlying system representation. + // The memory layout is not part of the stable interface that std exposes. inner: c::sockaddr_in6, } From 7ca2c981b28676a8411e0b2c96db001b9633c1d2 Mon Sep 17 00:00:00 2001 From: lcnr Date: Fri, 26 Mar 2021 19:52:09 +0100 Subject: [PATCH 12/12] fix doc comment for `ty::Dynamic --- compiler/rustc_middle/src/ty/sty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index 2cd969d7a16ab..e78e928398f8a 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -160,7 +160,7 @@ pub enum TyKind<'tcx> { /// ``` FnPtr(PolyFnSig<'tcx>), - /// A trait, defined with `trait`. + /// A trait object. Written as `dyn for<'b> Trait<'b, Assoc = u32> + Send + 'a`. Dynamic(&'tcx List>>, ty::Region<'tcx>), /// The anonymous type of a closure. Used to represent the type of