about summary refs log tree commit diff
path: root/compiler/rustc_error_codes/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-01-26 14:36:23 +0000
committerGitHub <noreply@github.com>2025-01-26 14:36:23 +0000
commitd7e942eb91111f3db249842ea1866e5bbf405538 (patch)
tree8db5894ece32ab3228cf11299b855c55cc1ce76e /compiler/rustc_error_codes/src
parent57eabac8351013154cef7bac0f27759094ff5a96 (diff)
parentc688ecf4680b18734690159de7ba1ebf0c7e4026 (diff)
downloadrust-d7e942eb91111f3db249842ea1866e5bbf405538.tar.gz
rust-d7e942eb91111f3db249842ea1866e5bbf405538.zip
Merge pull request #4151 from rust-lang/rustup-2025-01-26
Automatic Rustup
Diffstat (limited to 'compiler/rustc_error_codes/src')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0393.md12
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0433.md2
2 files changed, 6 insertions, 8 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!
 ```
diff --git a/compiler/rustc_error_codes/src/error_codes/E0433.md b/compiler/rustc_error_codes/src/error_codes/E0433.md
index 5a64c13c9af..36e4b66e8dc 100644
--- a/compiler/rustc_error_codes/src/error_codes/E0433.md
+++ b/compiler/rustc_error_codes/src/error_codes/E0433.md
@@ -19,7 +19,7 @@ If you've expected to use a crate name:
 
 ```compile_fail
 use ferris_wheel::BigO;
-// error: failed to resolve: use of undeclared crate or module `ferris_wheel`
+// error: failed to resolve: use of undeclared module or unlinked crate
 ```
 
 Make sure the crate has been added as a dependency in `Cargo.toml`.