about summary refs log tree commit diff
path: root/compiler/rustc_error_codes
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-25 08:56:41 +0000
committerbors <bors@rust-lang.org>2025-01-25 08:56:41 +0000
commitf94018810c6c0f59df013c9c418e994b94cf1805 (patch)
treea9bba926836b86bd7bd0df4b7cc94e08e8a7bda4 /compiler/rustc_error_codes
parent6365178a6bee1ccf2a4960ecc9285c245e8978a9 (diff)
parenta330c7ee858a03dacaf10a7f88abb38eb4f1858a (diff)
downloadrust-f94018810c6c0f59df013c9c418e994b94cf1805.tar.gz
rust-f94018810c6c0f59df013c9c418e994b94cf1805.zip
Auto merge of #136041 - matthiaskrgr:rollup-5r1k45x, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #135971 (Properly report error when object type param default references self)
 - #135977 (Fix `FormattingOptions` instantiation with `Default`)
 - #135985 (Rename test to `unresolvable-upvar-issue-87987.rs` and add some notes)
 - #135991 (Fix set_name in thread mod for NuttX)
 - #136009 (bootstrap: Handle bootstrap lockfile race condition better)
 - #136018 (Use short ty string for move errors)
 - #136027 (Skip suggestions in `derive`d code)
 - #136029 (Bootstrap: Don't move ownership of job object)
 - #136034 (fix(bootstrap): deserialize null as `f64::NAN`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_error_codes')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0393.md12
1 files changed, 5 insertions, 7 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0393.md b/compiler/rustc_error_codes/src/error_codes/E0393.md
index 50225b25163..c7260815905 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0393.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0393.md
@@ -3,12 +3,10 @@ A type parameter which references `Self` in its default value was not specified.
 Erroneous code example:
 
 ```compile_fail,E0393
-trait A<T=Self> {}
+trait A<T = Self> {}
 
-fn together_we_will_rule_the_galaxy(son: &A) {}
-// error: the type parameter `T` must be explicitly specified in an
-//        object type because its default value `Self` references the
-//        type `Self`
+fn together_we_will_rule_the_galaxy(son: &dyn A) {}
+// error: the type parameter `T` must be explicitly specified
 ```
 
 A trait object is defined over a single, fully-defined trait. With a regular
@@ -23,7 +21,7 @@ disallowed. Making the trait concrete by explicitly specifying the value of the
 defaulted parameter will fix this issue. Fixed example:
 
 ```
-trait A<T=Self> {}
+trait A<T = Self> {}
 
-fn together_we_will_rule_the_galaxy(son: &A<i32>) {} // Ok!
+fn together_we_will_rule_the_galaxy(son: &dyn A<i32>) {} // Ok!
 ```