diff options
| author | Ezra Shaw <ezrasure@outlook.com> | 2022-12-21 13:48:12 +1300 |
|---|---|---|
| committer | Ezra Shaw <ezrasure@outlook.com> | 2022-12-29 13:16:10 +1300 |
| commit | da7fcc7a09c213808134561ce99303b8d559d02b (patch) | |
| tree | 5fef35a9e58afc211630d229e41a1730d12dc79a /src/test/ui/error-codes | |
| parent | 270c94e484e19764a2832ef918c95224eb3f17c7 (diff) | |
| download | rust-da7fcc7a09c213808134561ce99303b8d559d02b.tar.gz rust-da7fcc7a09c213808134561ce99303b8d559d02b.zip | |
docs/test: add UI test and long-form error docs for `E0519`
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0519.rs | 8 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0519.stderr | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0519.rs b/src/test/ui/error-codes/E0519.rs new file mode 100644 index 00000000000..269ffd6320d --- /dev/null +++ b/src/test/ui/error-codes/E0519.rs @@ -0,0 +1,8 @@ +// no need to create a new aux file, we can use an existing. +// aux-build: crateresolve1-1.rs + +// set same metadata as `crateresolve1` +#![crate_name = "crateresolve1"] +#![crate_type = "lib"] + +extern crate crateresolve1; //~ ERROR E0519 diff --git a/src/test/ui/error-codes/E0519.stderr b/src/test/ui/error-codes/E0519.stderr new file mode 100644 index 00000000000..e24fc4aaa70 --- /dev/null +++ b/src/test/ui/error-codes/E0519.stderr @@ -0,0 +1,9 @@ +error[E0519]: the current crate is indistinguishable from one of its dependencies: it has the same crate-name `crateresolve1` and was compiled with the same `-C metadata` arguments. This will result in symbol conflicts between the two. + --> $DIR/E0519.rs:8:1 + | +LL | extern crate crateresolve1; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0519`. |
