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

Add a new test ui/incoherent-inherent-impls/no-other-unrelated-errors to check E0116 does not cause unrelated errors #133890

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// E0116 caused other unrelated errors, so check no unrelated errors are emmitted.

fn main() {
let x = "hello";
x.split(" ");
}

impl Vec<usize> {} //~ ERROR E0116
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined
--> $DIR/no-other-unrelated-errors.rs:8:1
|
LL | impl Vec<usize> {}
| ^^^^^^^^^^^^^^^ impl for type defined outside of crate
|
= note: define and implement a trait or new type instead

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0116`.
Loading