Rollup merge of #67122 - petrochenkov:nodedup, r=estebank
Do not deduplicate diagnostics in UI tests Error reporting infrastructure deduplicates identical diagnostics with identical spans. While it's preferable to do this in "release"/"user-facing" mode, it sometimes brings [confusion](https://github.com/rust-lang/rust/pull/50682#issuecomment-390949878) and hides details that may be important during development. Do we run some passes multiple times when we could do it once? How many times we run them exactly? Can this number be large? Can the multiplied error construction be expensive? Can speculative checks be made cheaper if they don't report errors? *Relying* on this mechanism to deduplicate some specific error never looks like a proper solution to me personally. In this PR I attempt to disable this deduplication by applying `-Z deduplicate-diagnostics=no` to UI tests.
This commit is contained in:
commit
68ae55bfac
212 changed files with 2963 additions and 363 deletions
|
@ -6,6 +6,7 @@ const fn f(x: usize) -> usize {
|
|||
let mut sum = 0;
|
||||
for i in 0..x {
|
||||
//~^ ERROR E0015
|
||||
//~| ERROR E0015
|
||||
//~| ERROR E0658
|
||||
//~| ERROR E0080
|
||||
//~| ERROR E0744
|
||||
|
|
|
@ -8,6 +8,7 @@ fn main() {
|
|||
//~| WARN denote infinite loops with
|
||||
[(); { for _ in 0usize.. {}; 0}];
|
||||
//~^ ERROR calls in constants are limited to constant functions
|
||||
//~| ERROR calls in constants are limited to constant functions
|
||||
//~| ERROR `for` is not allowed in a `const`
|
||||
//~| ERROR references in constants may only refer to immutable values
|
||||
//~| ERROR evaluation of constant value failed
|
||||
|
|
|
@ -10,6 +10,8 @@ fn lintme() { } //~ ERROR item is named 'lintme'
|
|||
|
||||
#[allow(test_lint)]
|
||||
//~^ ERROR allow(test_lint) overruled by outer forbid(test_lint)
|
||||
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
|
||||
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
|
||||
pub fn main() {
|
||||
lintme();
|
||||
}
|
||||
|
|
|
@ -7,6 +7,15 @@ LL | #![forbid(test_lint)]
|
|||
LL | #[allow(test_lint)]
|
||||
| ^^^^^^^^^ overruled by previous forbid
|
||||
|
||||
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
|
||||
--> $DIR/lint-plugin-forbid-attrs.rs:11:9
|
||||
|
|
||||
LL | #![forbid(test_lint)]
|
||||
| --------- `forbid` level set here
|
||||
...
|
||||
LL | #[allow(test_lint)]
|
||||
| ^^^^^^^^^ overruled by previous forbid
|
||||
|
||||
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
|
||||
--> $DIR/lint-plugin-forbid-attrs.rs:5:1
|
||||
|
|
||||
|
@ -27,6 +36,15 @@ note: lint level defined here
|
|||
LL | #![forbid(test_lint)]
|
||||
| ^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
|
||||
--> $DIR/lint-plugin-forbid-attrs.rs:11:9
|
||||
|
|
||||
LL | #![forbid(test_lint)]
|
||||
| --------- `forbid` level set here
|
||||
...
|
||||
LL | #[allow(test_lint)]
|
||||
| ^^^^^^^^^ overruled by previous forbid
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0453`.
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
fn lintme() { } //~ ERROR item is named 'lintme'
|
||||
|
||||
#[allow(test_lint)] //~ ERROR allow(test_lint) overruled by outer forbid(test_lint)
|
||||
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
|
||||
//~| ERROR allow(test_lint) overruled by outer forbid(test_lint)
|
||||
pub fn main() {
|
||||
lintme();
|
||||
}
|
||||
|
|
|
@ -6,6 +6,14 @@ LL | #[allow(test_lint)]
|
|||
|
|
||||
= note: `forbid` lint level was set on command line
|
||||
|
||||
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
|
||||
--> $DIR/lint-plugin-forbid-cmdline.rs:10:9
|
||||
|
|
||||
LL | #[allow(test_lint)]
|
||||
| ^^^^^^^^^ overruled by previous forbid
|
||||
|
|
||||
= note: `forbid` lint level was set on command line
|
||||
|
||||
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
|
||||
--> $DIR/lint-plugin-forbid-cmdline.rs:6:1
|
||||
|
|
||||
|
@ -22,6 +30,14 @@ LL | fn lintme() { }
|
|||
|
|
||||
= note: requested on the command line with `-F test-lint`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error[E0453]: allow(test_lint) overruled by outer forbid(test_lint)
|
||||
--> $DIR/lint-plugin-forbid-cmdline.rs:10:9
|
||||
|
|
||||
LL | #[allow(test_lint)]
|
||||
| ^^^^^^^^^ overruled by previous forbid
|
||||
|
|
||||
= note: `forbid` lint level was set on command line
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0453`.
|
||||
|
|
|
@ -2,6 +2,10 @@ warning: lint name `test_lint` is deprecated and does not have an effect anymore
|
|||
|
|
||||
= note: requested on the command line with `-A test_lint`
|
||||
|
||||
warning: lint name `test_lint` is deprecated and does not have an effect anymore. Use: clippy::test_lint
|
||||
|
|
||||
= note: requested on the command line with `-A test_lint`
|
||||
|
||||
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
|
||||
--> $DIR/lint-tool-cmdline-allow.rs:7:1
|
||||
|
|
||||
|
@ -10,6 +14,10 @@ LL | #![plugin(lint_tool_test)]
|
|||
|
|
||||
= note: `#[warn(deprecated)]` on by default
|
||||
|
||||
warning: lint name `test_lint` is deprecated and does not have an effect anymore. Use: clippy::test_lint
|
||||
|
|
||||
= note: requested on the command line with `-A test_lint`
|
||||
|
||||
warning: item is named 'lintme'
|
||||
--> $DIR/lint-tool-cmdline-allow.rs:9:1
|
||||
|
|
||||
|
@ -18,3 +26,7 @@ LL | fn lintme() {}
|
|||
|
|
||||
= note: `#[warn(clippy::test_lint)]` on by default
|
||||
|
||||
warning: lint name `test_lint` is deprecated and does not have an effect anymore. Use: clippy::test_lint
|
||||
|
|
||||
= note: requested on the command line with `-A test_lint`
|
||||
|
||||
|
|
|
@ -8,9 +8,12 @@
|
|||
#![allow(dead_code)]
|
||||
#![cfg_attr(foo, warn(test_lint))]
|
||||
//~^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future
|
||||
//~^^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future
|
||||
//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
|
||||
//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
|
||||
#![deny(clippy_group)]
|
||||
//~^ WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
|
||||
//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
|
||||
//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
|
||||
|
||||
fn lintme() { } //~ ERROR item is named 'lintme'
|
||||
|
||||
|
@ -25,6 +28,8 @@ pub fn main() {
|
|||
|
||||
#[allow(test_group)]
|
||||
//~^ WARNING lint name `test_group` is deprecated and may not have an effect in the future
|
||||
//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
|
||||
//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
|
||||
#[deny(this_lint_does_not_exist)] //~ WARNING unknown lint: `this_lint_does_not_exist`
|
||||
fn hello() {
|
||||
fn lintmetoo() { }
|
||||
|
|
|
@ -7,19 +7,19 @@ LL | #![cfg_attr(foo, warn(test_lint))]
|
|||
= note: `#[warn(renamed_and_removed_lints)]` on by default
|
||||
|
||||
warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
|
||||
--> $DIR/lint-tool-test.rs:12:9
|
||||
--> $DIR/lint-tool-test.rs:13:9
|
||||
|
|
||||
LL | #![deny(clippy_group)]
|
||||
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
|
||||
|
||||
warning: lint name `test_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
|
||||
--> $DIR/lint-tool-test.rs:26:9
|
||||
--> $DIR/lint-tool-test.rs:29:9
|
||||
|
|
||||
LL | #[allow(test_group)]
|
||||
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
|
||||
|
||||
warning: unknown lint: `this_lint_does_not_exist`
|
||||
--> $DIR/lint-tool-test.rs:28:8
|
||||
--> $DIR/lint-tool-test.rs:33:8
|
||||
|
|
||||
LL | #[deny(this_lint_does_not_exist)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -32,6 +32,18 @@ warning: lint name `test_lint` is deprecated and may not have an effect in the f
|
|||
LL | #![cfg_attr(foo, warn(test_lint))]
|
||||
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
|
||||
|
||||
warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
|
||||
--> $DIR/lint-tool-test.rs:13:9
|
||||
|
|
||||
LL | #![deny(clippy_group)]
|
||||
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
|
||||
|
||||
warning: lint name `test_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
|
||||
--> $DIR/lint-tool-test.rs:29:9
|
||||
|
|
||||
LL | #[allow(test_group)]
|
||||
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
|
||||
|
||||
warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
|
||||
--> $DIR/lint-tool-test.rs:6:1
|
||||
|
|
||||
|
@ -40,31 +52,49 @@ LL | #![plugin(lint_tool_test)]
|
|||
|
|
||||
= note: `#[warn(deprecated)]` on by default
|
||||
|
||||
warning: lint name `test_lint` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
|
||||
--> $DIR/lint-tool-test.rs:9:23
|
||||
|
|
||||
LL | #![cfg_attr(foo, warn(test_lint))]
|
||||
| ^^^^^^^^^ help: change it to: `clippy::test_lint`
|
||||
|
||||
warning: lint name `clippy_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
|
||||
--> $DIR/lint-tool-test.rs:13:9
|
||||
|
|
||||
LL | #![deny(clippy_group)]
|
||||
| ^^^^^^^^^^^^ help: change it to: `clippy::group`
|
||||
|
||||
error: item is named 'lintme'
|
||||
--> $DIR/lint-tool-test.rs:15:1
|
||||
--> $DIR/lint-tool-test.rs:18:1
|
||||
|
|
||||
LL | fn lintme() { }
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: lint level defined here
|
||||
--> $DIR/lint-tool-test.rs:12:9
|
||||
--> $DIR/lint-tool-test.rs:13:9
|
||||
|
|
||||
LL | #![deny(clippy_group)]
|
||||
| ^^^^^^^^^^^^
|
||||
= note: `#[deny(clippy::test_lint)]` implied by `#[deny(clippy::group)]`
|
||||
|
||||
error: item is named 'lintmetoo'
|
||||
--> $DIR/lint-tool-test.rs:23:5
|
||||
--> $DIR/lint-tool-test.rs:26:5
|
||||
|
|
||||
LL | fn lintmetoo() { }
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: lint level defined here
|
||||
--> $DIR/lint-tool-test.rs:12:9
|
||||
--> $DIR/lint-tool-test.rs:13:9
|
||||
|
|
||||
LL | #![deny(clippy_group)]
|
||||
| ^^^^^^^^^^^^
|
||||
= note: `#[deny(clippy::test_group)]` implied by `#[deny(clippy::group)]`
|
||||
|
||||
warning: lint name `test_group` is deprecated and may not have an effect in the future. Also `cfg_attr(cargo-clippy)` won't be necessary anymore
|
||||
--> $DIR/lint-tool-test.rs:29:9
|
||||
|
|
||||
LL | #[allow(test_group)]
|
||||
| ^^^^^^^^^^ help: change it to: `clippy::test_group`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -157,10 +157,13 @@ trait TRW3<T> where T: Iterator<Item: 'static, Item: 'static> {}
|
|||
//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||
//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||
//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||
//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
|
||||
//~| ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
||||
//~^ ERROR the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified [E0719]
|
||||
trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
||||
|
|
|
@ -531,7 +531,15 @@ LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
|||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:160:46
|
||||
--> $DIR/duplicate.rs:158:46
|
||||
|
|
||||
LL | trait TRSW1 where Self: Iterator<Item: Copy, Item: Send> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
| |
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:161:46
|
||||
|
|
||||
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
|
@ -539,7 +547,15 @@ LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
|||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:162:49
|
||||
--> $DIR/duplicate.rs:161:46
|
||||
|
|
||||
LL | trait TRSW2 where Self: Iterator<Item: Copy, Item: Copy> {}
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
| |
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:164:49
|
||||
|
|
||||
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
|
@ -547,7 +563,15 @@ LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
|||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:164:43
|
||||
--> $DIR/duplicate.rs:164:49
|
||||
|
|
||||
LL | trait TRSW3 where Self: Iterator<Item: 'static, Item: 'static> {}
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
| |
|
||||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:167:43
|
||||
|
|
||||
LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
|
@ -555,7 +579,7 @@ LL | trait TRA1 { type A: Iterator<Item: Copy, Item: Send>; }
|
|||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:166:43
|
||||
--> $DIR/duplicate.rs:169:43
|
||||
|
|
||||
LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
|
@ -563,7 +587,7 @@ LL | trait TRA2 { type A: Iterator<Item: Copy, Item: Copy>; }
|
|||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:168:46
|
||||
--> $DIR/duplicate.rs:171:46
|
||||
|
|
||||
LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
|
@ -571,7 +595,7 @@ LL | trait TRA3 { type A: Iterator<Item: 'static, Item: 'static>; }
|
|||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:171:40
|
||||
--> $DIR/duplicate.rs:174:40
|
||||
|
|
||||
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
|
@ -579,7 +603,7 @@ LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
|||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:175:44
|
||||
--> $DIR/duplicate.rs:178:44
|
||||
|
|
||||
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||
| ---------- ^^^^^^^^^^ re-bound here
|
||||
|
@ -587,7 +611,7 @@ LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
|||
| `Item` bound here first
|
||||
|
||||
error[E0719]: the value of the associated type `Item` (from trait `std::iter::Iterator`) is already specified
|
||||
--> $DIR/duplicate.rs:179:43
|
||||
--> $DIR/duplicate.rs:182:43
|
||||
|
|
||||
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||
| ------------- ^^^^^^^^^^^^^ re-bound here
|
||||
|
@ -667,40 +691,40 @@ LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
|
|||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:171:28
|
||||
--> $DIR/duplicate.rs:174:28
|
||||
|
|
||||
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:171:40
|
||||
--> $DIR/duplicate.rs:174:40
|
||||
|
|
||||
LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:175:32
|
||||
--> $DIR/duplicate.rs:178:32
|
||||
|
|
||||
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:175:44
|
||||
--> $DIR/duplicate.rs:178:44
|
||||
|
|
||||
LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:179:28
|
||||
--> $DIR/duplicate.rs:182:28
|
||||
|
|
||||
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: could not find defining uses
|
||||
--> $DIR/duplicate.rs:179:43
|
||||
--> $DIR/duplicate.rs:182:43
|
||||
|
|
||||
LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 93 previous errors
|
||||
error: aborting due to 96 previous errors
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ impl<T> Trait<'_, '_> for T { }
|
|||
|
||||
async fn async_ret_impl_trait<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
|
||||
//~^ ERROR ambiguous lifetime bound
|
||||
//~| ERROR ambiguous lifetime bound
|
||||
(a, b)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,5 +6,13 @@ LL | async fn async_ret_impl_trait<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'
|
|||
|
|
||||
= help: add #![feature(member_constraints)] to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
error: ambiguous lifetime bound in `impl Trait`
|
||||
--> $DIR/ret-impl-trait-no-fg.rs:9:64
|
||||
|
|
||||
LL | async fn async_ret_impl_trait<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
|
||||
| ^^^^^^^^^^^^^^^^^^ neither `'a` nor `'b` outlives the other
|
||||
|
|
||||
= help: add #![feature(member_constraints)] to the crate attributes to enable
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -8,8 +8,16 @@ async fn bar<T>() -> () {}
|
|||
async fn foo() {
|
||||
bar().await;
|
||||
//~^ ERROR type inside `async fn` body must be known in this context
|
||||
//~| ERROR type inside `async fn` body must be known in this context
|
||||
//~| ERROR type inside `async fn` body must be known in this context
|
||||
//~| NOTE cannot infer type for type parameter `T`
|
||||
//~| NOTE cannot infer type for type parameter `T`
|
||||
//~| NOTE cannot infer type for type parameter `T`
|
||||
//~| NOTE the type is part of the `async fn` body because of this `await`
|
||||
//~| NOTE the type is part of the `async fn` body because of this `await`
|
||||
//~| NOTE the type is part of the `async fn` body because of this `await`
|
||||
//~| NOTE in this expansion of desugaring of `await`
|
||||
//~| NOTE in this expansion of desugaring of `await`
|
||||
//~| NOTE in this expansion of desugaring of `await`
|
||||
}
|
||||
fn main() {}
|
||||
|
|
|
@ -10,6 +10,30 @@ note: the type is part of the `async fn` body because of this `await`
|
|||
LL | bar().await;
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0698]: type inside `async fn` body must be known in this context
|
||||
--> $DIR/unresolved_type_param.rs:9:5
|
||||
|
|
||||
LL | bar().await;
|
||||
| ^^^ cannot infer type for type parameter `T` declared on the function `bar`
|
||||
|
|
||||
note: the type is part of the `async fn` body because of this `await`
|
||||
--> $DIR/unresolved_type_param.rs:9:5
|
||||
|
|
||||
LL | bar().await;
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error[E0698]: type inside `async fn` body must be known in this context
|
||||
--> $DIR/unresolved_type_param.rs:9:5
|
||||
|
|
||||
LL | bar().await;
|
||||
| ^^^ cannot infer type for type parameter `T` declared on the function `bar`
|
||||
|
|
||||
note: the type is part of the `async fn` body because of this `await`
|
||||
--> $DIR/unresolved_type_param.rs:9:5
|
||||
|
|
||||
LL | bar().await;
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0698`.
|
||||
|
|
|
@ -11,4 +11,5 @@ use tool as renamed_tool; // OK
|
|||
|
||||
#[renamed_attr] //~ ERROR cannot use an explicitly registered attribute through an import
|
||||
#[renamed_tool::attr] //~ ERROR cannot use a tool module through an import
|
||||
//~| ERROR cannot use a tool module through an import
|
||||
fn main() {}
|
||||
|
|
|
@ -22,5 +22,17 @@ note: the tool module imported here
|
|||
LL | use tool as renamed_tool; // OK
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: cannot use a tool module through an import
|
||||
--> $DIR/register-attr-tool-import.rs:13:3
|
||||
|
|
||||
LL | #[renamed_tool::attr]
|
||||
| ^^^^^^^^^^^^
|
||||
|
|
||||
note: the tool module imported here
|
||||
--> $DIR/register-attr-tool-import.rs:10:5
|
||||
|
|
||||
LL | use tool as renamed_tool; // OK
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ impl<'a, 't> Foo<'a, 't> for &'a isize {
|
|||
|
||||
fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
|
||||
//~^ ERROR method not compatible with trait
|
||||
//~| ERROR method not compatible with trait
|
||||
//
|
||||
// Note: This is a terrible error message. It is caused
|
||||
// because, in the trait, 'b is early bound, and in the impl,
|
||||
|
|
|
@ -35,8 +35,27 @@ note: ...does not necessarily outlive the lifetime `'c` as defined on the method
|
|||
LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
|
||||
| ^^
|
||||
|
||||
error[E0308]: method not compatible with trait
|
||||
--> $DIR/regions-bound-missing-bound-in-impl.rs:27:5
|
||||
|
|
||||
LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
|
||||
|
|
||||
= note: expected fn pointer `fn(&'a isize, Inv<'c>, Inv<'c>, Inv<'_>)`
|
||||
found fn pointer `fn(&'a isize, Inv<'_>, Inv<'c>, Inv<'_>)`
|
||||
note: the lifetime `'c` as defined on the method body at 27:24...
|
||||
--> $DIR/regions-bound-missing-bound-in-impl.rs:27:24
|
||||
|
|
||||
LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
|
||||
| ^^
|
||||
note: ...does not necessarily outlive the lifetime `'c` as defined on the method body at 27:24
|
||||
--> $DIR/regions-bound-missing-bound-in-impl.rs:27:24
|
||||
|
|
||||
LL | fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
|
||||
| ^^
|
||||
|
||||
error[E0195]: lifetime parameters or bounds on method `wrong_bound2` do not match the trait declaration
|
||||
--> $DIR/regions-bound-missing-bound-in-impl.rs:41:20
|
||||
--> $DIR/regions-bound-missing-bound-in-impl.rs:42:20
|
||||
|
|
||||
LL | fn wrong_bound2<'b,'c,'d:'a+'b>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>);
|
||||
| ---------------- lifetimes in impl do not match this method in trait
|
||||
|
@ -45,7 +64,7 @@ LL | fn wrong_bound2(self, b: Inv, c: Inv, d: Inv) {
|
|||
| ^ lifetimes do not match method in trait
|
||||
|
||||
error[E0276]: impl has stricter requirements than trait
|
||||
--> $DIR/regions-bound-missing-bound-in-impl.rs:48:5
|
||||
--> $DIR/regions-bound-missing-bound-in-impl.rs:49:5
|
||||
|
|
||||
LL | fn another_bound<'x: 'a>(self, x: Inv<'x>, y: Inv<'t>);
|
||||
| ------------------------------------------------------- definition of `another_bound` from trait
|
||||
|
@ -53,7 +72,7 @@ LL | fn another_bound<'x: 'a>(self, x: Inv<'x>, y: Inv<'t>);
|
|||
LL | fn another_bound<'x: 't>(self, x: Inv<'x>, y: Inv<'t>) {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'x: 't`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0195, E0276, E0308.
|
||||
For more information about an error, try `rustc --explain E0195`.
|
||||
|
|
|
@ -14,6 +14,7 @@ fn main() {
|
|||
match -128i8 {
|
||||
NEG_NEG_128 => println!("A"),
|
||||
//~^ ERROR could not evaluate constant pattern
|
||||
//~| ERROR could not evaluate constant pattern
|
||||
_ => println!("B"),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,5 +4,11 @@ error: could not evaluate constant pattern
|
|||
LL | NEG_NEG_128 => println!("A"),
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error: could not evaluate constant pattern
|
||||
--> $DIR/const-eval-overflow-2.rs:15:9
|
||||
|
|
||||
LL | NEG_NEG_128 => println!("A"),
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ fn main() {
|
|||
match n {
|
||||
0..=10 => {},
|
||||
10..=BAR => {}, //~ ERROR could not evaluate constant pattern
|
||||
//~| ERROR could not evaluate constant pattern
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error[E0080]: it is undefined behavior to use this value
|
||||
--> $DIR/ref_to_int_match.rs:24:1
|
||||
--> $DIR/ref_to_int_match.rs:25:1
|
||||
|
|
||||
LL | const BAR: Int = unsafe { Foo { r: &42 }.f };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type validation failed: encountered a pointer, but expected initialized plain (non-pointer) bytes
|
||||
|
@ -12,6 +12,12 @@ error: could not evaluate constant pattern
|
|||
LL | 10..=BAR => {},
|
||||
| ^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: could not evaluate constant pattern
|
||||
--> $DIR/ref_to_int_match.rs:7:14
|
||||
|
|
||||
LL | 10..=BAR => {},
|
||||
| ^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
|
@ -17,6 +17,7 @@ macro_rules! mac {
|
|||
enum E {
|
||||
$( $v = $s::V, )*
|
||||
//~^ ERROR mismatched types
|
||||
//~| ERROR mismatched types
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,23 @@ help: you can convert an `i32` to `isize` and panic if the converted value would
|
|||
LL | $( $v = $s::V.try_into().unwrap(), )*
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/enum-discr-type-err.rs:18:21
|
||||
|
|
||||
LL | $( $v = $s::V, )*
|
||||
| ^^^^^ expected `isize`, found `i32`
|
||||
...
|
||||
LL | / mac! {
|
||||
LL | | A = F,
|
||||
LL | | B = T,
|
||||
LL | | }
|
||||
| |_- in this macro invocation
|
||||
|
|
||||
help: you can convert an `i32` to `isize` and panic if the converted value wouldn't fit
|
||||
|
|
||||
LL | $( $v = $s::V.try_into().unwrap(), )*
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
|
|
@ -10,6 +10,7 @@ fn main() {
|
|||
match C {
|
||||
C => {}
|
||||
//~^ ERROR to use a constant of type `S` in a pattern, `S` must be annotated with
|
||||
//~| ERROR to use a constant of type `S` in a pattern, `S` must be annotated with
|
||||
}
|
||||
const K: &T = &T;
|
||||
match K { //~ ERROR non-exhaustive patterns: `&T` not covered
|
||||
|
|
|
@ -5,7 +5,7 @@ LL | C => {}
|
|||
| ^
|
||||
|
||||
error[E0004]: non-exhaustive patterns: `&T` not covered
|
||||
--> $DIR/match_ice.rs:15:11
|
||||
--> $DIR/match_ice.rs:16:11
|
||||
|
|
||||
LL | struct T;
|
||||
| --------- `T` defined here
|
||||
|
@ -15,6 +15,12 @@ LL | match K {
|
|||
|
|
||||
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: to use a constant of type `S` in a pattern, `S` must be annotated with `#[derive(PartialEq, Eq)]`
|
||||
--> $DIR/match_ice.rs:11:9
|
||||
|
|
||||
LL | C => {}
|
||||
| ^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0004`.
|
||||
|
|
|
@ -28,6 +28,7 @@ const READ_INTERIOR_MUT: usize = {
|
|||
static mut MUTABLE: u32 = 0;
|
||||
const READ_MUT: u32 = unsafe { MUTABLE }; //~ WARN any use of this value will cause an error
|
||||
//~^ WARN skipping const checks
|
||||
//~| WARN skipping const checks
|
||||
|
||||
// ok some day perhaps
|
||||
const READ_IMMUT: &usize = { //~ ERROR it is undefined behavior to use this value
|
||||
|
|
|
@ -29,7 +29,13 @@ LL | const READ_MUT: u32 = unsafe { MUTABLE };
|
|||
| ^^^^^^^
|
||||
|
||||
warning: skipping const checks
|
||||
--> $DIR/const_refers_to_static.rs:35:6
|
||||
--> $DIR/const_refers_to_static.rs:29:32
|
||||
|
|
||||
LL | const READ_MUT: u32 = unsafe { MUTABLE };
|
||||
| ^^^^^^^
|
||||
|
||||
warning: skipping const checks
|
||||
--> $DIR/const_refers_to_static.rs:36:6
|
||||
|
|
||||
LL | &FOO
|
||||
| ^^^
|
||||
|
@ -84,7 +90,7 @@ LL | const READ_MUT: u32 = unsafe { MUTABLE };
|
|||
| constant accesses static
|
||||
|
||||
error[E0080]: it is undefined behavior to use this value
|
||||
--> $DIR/const_refers_to_static.rs:33:1
|
||||
--> $DIR/const_refers_to_static.rs:34:1
|
||||
|
|
||||
LL | / const READ_IMMUT: &usize = {
|
||||
LL | | static FOO: usize = 0;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
fn main() {
|
||||
match &b""[..] {
|
||||
ZST => {} //~ ERROR could not evaluate constant pattern
|
||||
//~| ERROR could not evaluate constant pattern
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error: any use of this value will cause an error
|
||||
--> $DIR/transmute-size-mismatch-before-typeck.rs:14:29
|
||||
--> $DIR/transmute-size-mismatch-before-typeck.rs:15:29
|
||||
|
|
||||
LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
|
||||
| ----------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^---
|
||||
|
@ -15,7 +15,7 @@ LL | ZST => {}
|
|||
| ^^^
|
||||
|
||||
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
|
||||
--> $DIR/transmute-size-mismatch-before-typeck.rs:14:29
|
||||
--> $DIR/transmute-size-mismatch-before-typeck.rs:15:29
|
||||
|
|
||||
LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -23,6 +23,12 @@ LL | const ZST: &[u8] = unsafe { std::mem::transmute(1usize) };
|
|||
= note: source type: `usize` (word size)
|
||||
= note: target type: `&'static [u8]` (2 * word size)
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: could not evaluate constant pattern
|
||||
--> $DIR/transmute-size-mismatch-before-typeck.rs:10:9
|
||||
|
|
||||
LL | ZST => {}
|
||||
| ^^^
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0512`.
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
trait Foo<X = Box<dyn Foo>> {
|
||||
//~^ ERROR cycle detected
|
||||
//~| ERROR cycle detected
|
||||
}
|
||||
|
||||
fn main() { }
|
||||
|
|
|
@ -11,6 +11,19 @@ note: cycle used when collecting item types in top-level module
|
|||
LL | trait Foo<X = Box<dyn Foo>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0391]: cycle detected when processing `Foo::X`
|
||||
--> $DIR/cycle-trait-default-type-trait.rs:4:23
|
||||
|
|
||||
LL | trait Foo<X = Box<dyn Foo>> {
|
||||
| ^^^
|
||||
|
|
||||
= note: ...which again requires processing `Foo::X`, completing the cycle
|
||||
note: cycle used when collecting item types in top-level module
|
||||
--> $DIR/cycle-trait-default-type-trait.rs:4:1
|
||||
|
|
||||
LL | trait Foo<X = Box<dyn Foo>> {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0391`.
|
||||
|
|
28
src/test/ui/deduplicate-diagnostics-2.deduplicate.stderr
Normal file
28
src/test/ui/deduplicate-diagnostics-2.deduplicate.stderr
Normal file
|
@ -0,0 +1,28 @@
|
|||
warning: floating-point types cannot be used in patterns
|
||||
--> $DIR/deduplicate-diagnostics-2.rs:7:9
|
||||
|
|
||||
LL | 1.0 => {}
|
||||
| ^^^
|
||||
|
|
||||
= note: `#[warn(illegal_floating_point_literal_pattern)]` on by default
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
|
||||
|
||||
warning: floating-point types cannot be used in patterns
|
||||
--> $DIR/deduplicate-diagnostics-2.rs:11:9
|
||||
|
|
||||
LL | 2.0 => {}
|
||||
| ^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
|
||||
|
||||
warning: floating-point types cannot be used in patterns
|
||||
--> $DIR/deduplicate-diagnostics-2.rs:7:9
|
||||
|
|
||||
LL | 1.0 => {}
|
||||
| ^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
|
||||
|
37
src/test/ui/deduplicate-diagnostics-2.duplicate.stderr
Normal file
37
src/test/ui/deduplicate-diagnostics-2.duplicate.stderr
Normal file
|
@ -0,0 +1,37 @@
|
|||
warning: floating-point types cannot be used in patterns
|
||||
--> $DIR/deduplicate-diagnostics-2.rs:7:9
|
||||
|
|
||||
LL | 1.0 => {}
|
||||
| ^^^
|
||||
|
|
||||
= note: `#[warn(illegal_floating_point_literal_pattern)]` on by default
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
|
||||
|
||||
warning: floating-point types cannot be used in patterns
|
||||
--> $DIR/deduplicate-diagnostics-2.rs:11:9
|
||||
|
|
||||
LL | 2.0 => {}
|
||||
| ^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
|
||||
|
||||
warning: floating-point types cannot be used in patterns
|
||||
--> $DIR/deduplicate-diagnostics-2.rs:7:9
|
||||
|
|
||||
LL | 1.0 => {}
|
||||
| ^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
|
||||
|
||||
warning: floating-point types cannot be used in patterns
|
||||
--> $DIR/deduplicate-diagnostics-2.rs:11:9
|
||||
|
|
||||
LL | 2.0 => {}
|
||||
| ^^^
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
|
||||
|
17
src/test/ui/deduplicate-diagnostics-2.rs
Normal file
17
src/test/ui/deduplicate-diagnostics-2.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
// build-pass
|
||||
// revisions: duplicate deduplicate
|
||||
//[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes
|
||||
|
||||
fn main() {
|
||||
match 0.0 {
|
||||
1.0 => {} //~ WARNING floating-point types cannot be used in patterns
|
||||
//~| WARNING this was previously accepted
|
||||
//~| WARNING floating-point types cannot be used in patterns
|
||||
//~| WARNING this was previously accepted
|
||||
2.0 => {} //~ WARNING floating-point types cannot be used in patterns
|
||||
//~| WARNING this was previously accepted
|
||||
//[duplicate]~| WARNING floating-point types cannot be used in patterns
|
||||
//[duplicate]~| WARNING this was previously accepted
|
||||
_ => {}
|
||||
}
|
||||
}
|
|
@ -1,8 +1,15 @@
|
|||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/deduplicate-diagnostics.rs:8:8
|
||||
|
|
||||
LL | #[deny("literal")]
|
||||
| ^^^^^^^^^ bad attribute argument
|
||||
|
||||
error: cannot find derive macro `Unresolved` in this scope
|
||||
--> $DIR/deduplicate-diagnostics.rs:4:10
|
||||
|
|
||||
LL | #[derive(Unresolved)]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0452`.
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/deduplicate-diagnostics.rs:8:8
|
||||
|
|
||||
LL | #[deny("literal")]
|
||||
| ^^^^^^^^^ bad attribute argument
|
||||
|
||||
error: cannot find derive macro `Unresolved` in this scope
|
||||
--> $DIR/deduplicate-diagnostics.rs:4:10
|
||||
|
|
||||
|
@ -10,5 +16,18 @@ error: cannot find derive macro `Unresolved` in this scope
|
|||
LL | #[derive(Unresolved)]
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/deduplicate-diagnostics.rs:8:8
|
||||
|
|
||||
LL | #[deny("literal")]
|
||||
| ^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/deduplicate-diagnostics.rs:8:8
|
||||
|
|
||||
LL | #[deny("literal")]
|
||||
| ^^^^^^^^^ bad attribute argument
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0452`.
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
// revisions: duplicate deduplicate
|
||||
//[duplicate] compile-flags: -Z deduplicate-diagnostics=no
|
||||
//[deduplicate] compile-flags: -Z deduplicate-diagnostics=yes
|
||||
|
||||
#[derive(Unresolved)] //~ ERROR cannot find derive macro `Unresolved` in this scope
|
||||
//[duplicate]~| ERROR cannot find derive macro `Unresolved` in this scope
|
||||
struct S;
|
||||
|
||||
#[deny("literal")] //~ ERROR malformed lint attribute input
|
||||
//[duplicate]~| ERROR malformed lint attribute input
|
||||
//[duplicate]~| ERROR malformed lint attribute input
|
||||
fn main() {}
|
||||
|
|
|
@ -10,7 +10,11 @@ struct Error;
|
|||
#[derive(PartialOrd,PartialEq)]
|
||||
enum Enum {
|
||||
A {
|
||||
x: Error //~ ERROR
|
||||
x: Error //~ ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,42 @@ LL | x: Error
|
|||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-enum-struct-variant.rs:13:6
|
||||
|
|
||||
LL | x: Error
|
||||
| ^^^^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-enum-struct-variant.rs:13:6
|
||||
|
|
||||
LL | x: Error
|
||||
| ^^^^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-enum-struct-variant.rs:13:6
|
||||
|
|
||||
LL | x: Error
|
||||
| ^^^^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-enum-struct-variant.rs:13:6
|
||||
|
|
||||
LL | x: Error
|
||||
| ^^^^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
|
|
@ -10,7 +10,11 @@ struct Error;
|
|||
#[derive(PartialOrd,PartialEq)]
|
||||
enum Enum {
|
||||
A(
|
||||
Error //~ ERROR
|
||||
Error //~ ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,42 @@ LL | Error
|
|||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-enum.rs:13:6
|
||||
|
|
||||
LL | Error
|
||||
| ^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-enum.rs:13:6
|
||||
|
|
||||
LL | Error
|
||||
| ^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-enum.rs:13:6
|
||||
|
|
||||
LL | Error
|
||||
| ^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-enum.rs:13:6
|
||||
|
|
||||
LL | Error
|
||||
| ^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
|
|
@ -9,7 +9,11 @@ struct Error;
|
|||
|
||||
#[derive(PartialOrd,PartialEq)]
|
||||
struct Struct {
|
||||
x: Error //~ ERROR
|
||||
x: Error //~ ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -7,6 +7,42 @@ LL | x: Error
|
|||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-struct.rs:12:5
|
||||
|
|
||||
LL | x: Error
|
||||
| ^^^^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-struct.rs:12:5
|
||||
|
|
||||
LL | x: Error
|
||||
| ^^^^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-struct.rs:12:5
|
||||
|
|
||||
LL | x: Error
|
||||
| ^^^^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-struct.rs:12:5
|
||||
|
|
||||
LL | x: Error
|
||||
| ^^^^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
|
|
@ -9,7 +9,11 @@ struct Error;
|
|||
|
||||
#[derive(PartialOrd,PartialEq)]
|
||||
struct Struct(
|
||||
Error //~ ERROR
|
||||
Error //~ ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
//~| ERROR can't compare `Error` with `Error`
|
||||
);
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -7,6 +7,42 @@ LL | Error
|
|||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-tuple-struct.rs:12:5
|
||||
|
|
||||
LL | Error
|
||||
| ^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-tuple-struct.rs:12:5
|
||||
|
|
||||
LL | Error
|
||||
| ^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-tuple-struct.rs:12:5
|
||||
|
|
||||
LL | Error
|
||||
| ^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error[E0277]: can't compare `Error` with `Error`
|
||||
--> $DIR/derives-span-PartialOrd-tuple-struct.rs:12:5
|
||||
|
|
||||
LL | Error
|
||||
| ^^^^^ no implementation for `Error < Error` and `Error > Error`
|
||||
|
|
||||
= help: the trait `std::cmp::PartialOrd` is not implemented for `Error`
|
||||
= note: required by `std::cmp::PartialOrd::partial_cmp`
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#[derive(Send)]
|
||||
//~^ ERROR cannot find derive macro `Send` in this scope
|
||||
//~| ERROR cannot find derive macro `Send` in this scope
|
||||
struct Test;
|
||||
|
||||
#[derive(Sync)]
|
||||
//~^ ERROR cannot find derive macro `Sync` in this scope
|
||||
//~| ERROR cannot find derive macro `Sync` in this scope
|
||||
struct Test1;
|
||||
|
||||
pub fn main() {}
|
||||
|
|
|
@ -1,11 +1,23 @@
|
|||
error: cannot find derive macro `Sync` in this scope
|
||||
--> $DIR/deriving-bounds.rs:5:10
|
||||
--> $DIR/deriving-bounds.rs:6:10
|
||||
|
|
||||
LL | #[derive(Sync)]
|
||||
| ^^^^
|
||||
|
|
||||
note: unsafe traits like `Sync` should be implemented explicitly
|
||||
--> $DIR/deriving-bounds.rs:5:10
|
||||
--> $DIR/deriving-bounds.rs:6:10
|
||||
|
|
||||
LL | #[derive(Sync)]
|
||||
| ^^^^
|
||||
|
||||
error: cannot find derive macro `Sync` in this scope
|
||||
--> $DIR/deriving-bounds.rs:6:10
|
||||
|
|
||||
LL | #[derive(Sync)]
|
||||
| ^^^^
|
||||
|
|
||||
note: unsafe traits like `Sync` should be implemented explicitly
|
||||
--> $DIR/deriving-bounds.rs:6:10
|
||||
|
|
||||
LL | #[derive(Sync)]
|
||||
| ^^^^
|
||||
|
@ -22,5 +34,17 @@ note: unsafe traits like `Send` should be implemented explicitly
|
|||
LL | #[derive(Send)]
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: cannot find derive macro `Send` in this scope
|
||||
--> $DIR/deriving-bounds.rs:1:10
|
||||
|
|
||||
LL | #[derive(Send)]
|
||||
| ^^^^
|
||||
|
|
||||
note: unsafe traits like `Send` should be implemented explicitly
|
||||
--> $DIR/deriving-bounds.rs:1:10
|
||||
|
|
||||
LL | #[derive(Send)]
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#[derive(Eqr)]
|
||||
//~^ ERROR cannot find derive macro `Eqr` in this scope
|
||||
//~| ERROR cannot find derive macro `Eqr` in this scope
|
||||
struct Foo;
|
||||
|
||||
pub fn main() {}
|
||||
|
|
|
@ -4,5 +4,11 @@ error: cannot find derive macro `Eqr` in this scope
|
|||
LL | #[derive(Eqr)]
|
||||
| ^^^ help: a derive macro with a similar name exists: `Eq`
|
||||
|
||||
error: aborting due to previous error
|
||||
error: cannot find derive macro `Eqr` in this scope
|
||||
--> $DIR/deriving-meta-unknown-trait.rs:1:10
|
||||
|
|
||||
LL | #[derive(Eqr)]
|
||||
| ^^^ help: a derive macro with a similar name exists: `Eq`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#[derive(FromPrimitive)] //~ ERROR cannot find derive macro `FromPrimitive` in this scope
|
||||
//~| ERROR cannot find derive macro `FromPrimitive` in this scope
|
||||
enum Foo {}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -4,5 +4,11 @@ error: cannot find derive macro `FromPrimitive` in this scope
|
|||
LL | #[derive(FromPrimitive)]
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error: cannot find derive macro `FromPrimitive` in this scope
|
||||
--> $DIR/deriving-primitive.rs:1:10
|
||||
|
|
||||
LL | #[derive(FromPrimitive)]
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
@ -5,8 +5,10 @@ fn test_and() {
|
|||
let b = false;
|
||||
|
||||
let _ = a and b; //~ ERROR `and` is not a logical operator
|
||||
//~| ERROR `and` is not a logical operator
|
||||
|
||||
if a and b { //~ ERROR `and` is not a logical operator
|
||||
//~| ERROR `and` is not a logical operator
|
||||
println!("both");
|
||||
}
|
||||
|
||||
|
@ -18,8 +20,10 @@ fn test_or() {
|
|||
let b = false;
|
||||
|
||||
let _ = a or b; //~ ERROR `or` is not a logical operator
|
||||
//~| ERROR `or` is not a logical operator
|
||||
|
||||
if a or b { //~ ERROR `or` is not a logical operator
|
||||
//~| ERROR `or` is not a logical operator
|
||||
println!("both");
|
||||
}
|
||||
}
|
||||
|
@ -28,6 +32,7 @@ fn test_and_par() {
|
|||
let a = true;
|
||||
let b = false;
|
||||
if (a and b) { //~ ERROR `and` is not a logical operator
|
||||
//~| ERROR `and` is not a logical operator
|
||||
println!("both");
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +41,7 @@ fn test_or_par() {
|
|||
let a = true;
|
||||
let b = false;
|
||||
if (a or b) { //~ ERROR `or` is not a logical operator
|
||||
//~| ERROR `or` is not a logical operator
|
||||
println!("both");
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +50,7 @@ fn test_while_and() {
|
|||
let a = true;
|
||||
let b = false;
|
||||
while a and b { //~ ERROR `and` is not a logical operator
|
||||
//~| ERROR `and` is not a logical operator
|
||||
println!("both");
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +59,7 @@ fn test_while_or() {
|
|||
let a = true;
|
||||
let b = false;
|
||||
while a or b { //~ ERROR `or` is not a logical operator
|
||||
//~| ERROR `or` is not a logical operator
|
||||
println!("both");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,23 @@ LL | let _ = a and b;
|
|||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `and` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:9:10
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:7:15
|
||||
|
|
||||
LL | let _ = a and b;
|
||||
| ^^^ help: use `&&` to perform logical conjunction
|
||||
|
|
||||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `and` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:10:10
|
||||
|
|
||||
LL | if a and b {
|
||||
| ^^^ help: use `&&` to perform logical conjunction
|
||||
|
|
||||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `and` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:10:10
|
||||
|
|
||||
LL | if a and b {
|
||||
| ^^^ help: use `&&` to perform logical conjunction
|
||||
|
@ -15,7 +31,7 @@ LL | if a and b {
|
|||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `or` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:20:15
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:22:15
|
||||
|
|
||||
LL | let _ = a or b;
|
||||
| ^^ help: use `||` to perform logical disjunction
|
||||
|
@ -23,7 +39,23 @@ LL | let _ = a or b;
|
|||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `or` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:22:10
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:22:15
|
||||
|
|
||||
LL | let _ = a or b;
|
||||
| ^^ help: use `||` to perform logical disjunction
|
||||
|
|
||||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `or` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:25:10
|
||||
|
|
||||
LL | if a or b {
|
||||
| ^^ help: use `||` to perform logical disjunction
|
||||
|
|
||||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `or` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:25:10
|
||||
|
|
||||
LL | if a or b {
|
||||
| ^^ help: use `||` to perform logical disjunction
|
||||
|
@ -31,7 +63,15 @@ LL | if a or b {
|
|||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `and` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:30:11
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:34:11
|
||||
|
|
||||
LL | if (a and b) {
|
||||
| ^^^ help: use `&&` to perform logical conjunction
|
||||
|
|
||||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `and` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:34:11
|
||||
|
|
||||
LL | if (a and b) {
|
||||
| ^^^ help: use `&&` to perform logical conjunction
|
||||
|
@ -39,7 +79,15 @@ LL | if (a and b) {
|
|||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `or` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:38:11
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:43:11
|
||||
|
|
||||
LL | if (a or b) {
|
||||
| ^^ help: use `||` to perform logical disjunction
|
||||
|
|
||||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `or` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:43:11
|
||||
|
|
||||
LL | if (a or b) {
|
||||
| ^^ help: use `||` to perform logical disjunction
|
||||
|
@ -47,7 +95,15 @@ LL | if (a or b) {
|
|||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `and` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:46:13
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:52:13
|
||||
|
|
||||
LL | while a and b {
|
||||
| ^^^ help: use `&&` to perform logical conjunction
|
||||
|
|
||||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `and` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:52:13
|
||||
|
|
||||
LL | while a and b {
|
||||
| ^^^ help: use `&&` to perform logical conjunction
|
||||
|
@ -55,7 +111,15 @@ LL | while a and b {
|
|||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `or` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:54:13
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:61:13
|
||||
|
|
||||
LL | while a or b {
|
||||
| ^^ help: use `||` to perform logical disjunction
|
||||
|
|
||||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error: `or` is not a logical operator
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:61:13
|
||||
|
|
||||
LL | while a or b {
|
||||
| ^^ help: use `||` to perform logical disjunction
|
||||
|
@ -63,13 +127,13 @@ LL | while a or b {
|
|||
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:13:33
|
||||
--> $DIR/issue-54109-and_instead_of_ampersands.rs:15:33
|
||||
|
|
||||
LL | let _recovery_witness: () = 0;
|
||||
| -- ^ expected `()`, found integer
|
||||
| |
|
||||
| expected due to this
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: aborting due to 17 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
|
|
@ -2,5 +2,6 @@ fn main() {
|
|||
match 5u32 {
|
||||
1000 ..= 5 => {}
|
||||
//~^ ERROR lower range bound must be less than or equal to upper
|
||||
//~| ERROR lower range bound must be less than or equal to upper
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,12 @@ error[E0030]: lower range bound must be less than or equal to upper
|
|||
LL | 1000 ..= 5 => {}
|
||||
| ^^^^ lower bound larger than upper bound
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0030]: lower range bound must be less than or equal to upper
|
||||
--> $DIR/E0030.rs:3:9
|
||||
|
|
||||
LL | 1000 ..= 5 => {}
|
||||
| ^^^^ lower bound larger than upper bound
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0030`.
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
#![allow(foo = "")] //~ ERROR E0452
|
||||
|
||||
//~| ERROR E0452
|
||||
//~| ERROR E0452
|
||||
//~| ERROR E0452
|
||||
//~| ERROR E0452
|
||||
//~| ERROR E0452
|
||||
fn main() {
|
||||
}
|
||||
|
|
|
@ -4,6 +4,36 @@ error[E0452]: malformed lint attribute input
|
|||
LL | #![allow(foo = "")]
|
||||
| ^^^^^^^^ bad attribute argument
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/E0452.rs:1:10
|
||||
|
|
||||
LL | #![allow(foo = "")]
|
||||
| ^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/E0452.rs:1:10
|
||||
|
|
||||
LL | #![allow(foo = "")]
|
||||
| ^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/E0452.rs:1:10
|
||||
|
|
||||
LL | #![allow(foo = "")]
|
||||
| ^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/E0452.rs:1:10
|
||||
|
|
||||
LL | #![allow(foo = "")]
|
||||
| ^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/E0452.rs:1:10
|
||||
|
|
||||
LL | #![allow(foo = "")]
|
||||
| ^^^^^^^^ bad attribute argument
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0452`.
|
||||
|
|
|
@ -2,5 +2,7 @@
|
|||
|
||||
#[allow(non_snake_case)]
|
||||
//~^ ERROR allow(non_snake_case) overruled by outer forbid(non_snake_case)
|
||||
//~| ERROR allow(non_snake_case) overruled by outer forbid(non_snake_case)
|
||||
//~| ERROR allow(non_snake_case) overruled by outer forbid(non_snake_case)
|
||||
fn main() {
|
||||
}
|
||||
|
|
|
@ -7,6 +7,24 @@ LL |
|
|||
LL | #[allow(non_snake_case)]
|
||||
| ^^^^^^^^^^^^^^ overruled by previous forbid
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0453]: allow(non_snake_case) overruled by outer forbid(non_snake_case)
|
||||
--> $DIR/E0453.rs:3:9
|
||||
|
|
||||
LL | #![forbid(non_snake_case)]
|
||||
| -------------- `forbid` level set here
|
||||
LL |
|
||||
LL | #[allow(non_snake_case)]
|
||||
| ^^^^^^^^^^^^^^ overruled by previous forbid
|
||||
|
||||
error[E0453]: allow(non_snake_case) overruled by outer forbid(non_snake_case)
|
||||
--> $DIR/E0453.rs:3:9
|
||||
|
|
||||
LL | #![forbid(non_snake_case)]
|
||||
| -------------- `forbid` level set here
|
||||
LL |
|
||||
LL | #[allow(non_snake_case)]
|
||||
| ^^^^^^^^^^^^^^ overruled by previous forbid
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0453`.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// repr currently doesn't support literals
|
||||
#[repr("C")] //~ ERROR E0565
|
||||
//~| ERROR E0565
|
||||
struct A { }
|
||||
|
||||
fn main() { }
|
||||
|
|
|
@ -4,6 +4,12 @@ error[E0565]: meta item in `repr` must be an identifier
|
|||
LL | #[repr("C")]
|
||||
| ^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0565]: meta item in `repr` must be an identifier
|
||||
--> $DIR/E0565.rs:2:8
|
||||
|
|
||||
LL | #[repr("C")]
|
||||
| ^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0565`.
|
||||
|
|
|
@ -2,6 +2,14 @@ error[E0602]: unknown lint: `bogus`
|
|||
|
|
||||
= note: requested on the command line with `-D bogus`
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0602]: unknown lint: `bogus`
|
||||
|
|
||||
= note: requested on the command line with `-D bogus`
|
||||
|
||||
error[E0602]: unknown lint: `bogus`
|
||||
|
|
||||
= note: requested on the command line with `-D bogus`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0602`.
|
||||
|
|
|
@ -3,14 +3,17 @@
|
|||
mod derive {
|
||||
#[derive(x3300)]
|
||||
//~^ ERROR cannot find derive macro `x3300` in this scope
|
||||
//~| ERROR cannot find derive macro `x3300` in this scope
|
||||
union U { f: i32 }
|
||||
|
||||
#[derive(x3300)]
|
||||
//~^ ERROR cannot find derive macro `x3300` in this scope
|
||||
//~| ERROR cannot find derive macro `x3300` in this scope
|
||||
enum E { }
|
||||
|
||||
#[derive(x3300)]
|
||||
//~^ ERROR cannot find derive macro `x3300` in this scope
|
||||
//~| ERROR cannot find derive macro `x3300` in this scope
|
||||
struct S;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,23 @@
|
|||
error: cannot find derive macro `x3300` in this scope
|
||||
--> $DIR/issue-43106-gating-of-derive-2.rs:12:14
|
||||
--> $DIR/issue-43106-gating-of-derive-2.rs:14:14
|
||||
|
|
||||
LL | #[derive(x3300)]
|
||||
| ^^^^^
|
||||
|
||||
error: cannot find derive macro `x3300` in this scope
|
||||
--> $DIR/issue-43106-gating-of-derive-2.rs:8:14
|
||||
--> $DIR/issue-43106-gating-of-derive-2.rs:14:14
|
||||
|
|
||||
LL | #[derive(x3300)]
|
||||
| ^^^^^
|
||||
|
||||
error: cannot find derive macro `x3300` in this scope
|
||||
--> $DIR/issue-43106-gating-of-derive-2.rs:9:14
|
||||
|
|
||||
LL | #[derive(x3300)]
|
||||
| ^^^^^
|
||||
|
||||
error: cannot find derive macro `x3300` in this scope
|
||||
--> $DIR/issue-43106-gating-of-derive-2.rs:9:14
|
||||
|
|
||||
LL | #[derive(x3300)]
|
||||
| ^^^^^
|
||||
|
@ -16,5 +28,11 @@ error: cannot find derive macro `x3300` in this scope
|
|||
LL | #[derive(x3300)]
|
||||
| ^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: cannot find derive macro `x3300` in this scope
|
||||
--> $DIR/issue-43106-gating-of-derive-2.rs:4:14
|
||||
|
|
||||
LL | #[derive(x3300)]
|
||||
| ^^^^^
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ mod rustc_deprecated {
|
|||
|
||||
#[rustc_deprecated()] struct S;
|
||||
//~^ ERROR stability attributes may not be used outside of the standard library
|
||||
//~| ERROR stability attributes may not be used outside of the standard library
|
||||
|
||||
#[rustc_deprecated()] type T = S;
|
||||
//~^ ERROR stability attributes may not be used outside of the standard library
|
||||
|
|
|
@ -29,17 +29,23 @@ LL | #[rustc_deprecated()] struct S;
|
|||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0734]: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-rustc_deprecated.rs:22:5
|
||||
--> $DIR/issue-43106-gating-of-rustc_deprecated.rs:19:5
|
||||
|
|
||||
LL | #[rustc_deprecated()] struct S;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0734]: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-rustc_deprecated.rs:23:5
|
||||
|
|
||||
LL | #[rustc_deprecated()] type T = S;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0734]: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-rustc_deprecated.rs:25:5
|
||||
--> $DIR/issue-43106-gating-of-rustc_deprecated.rs:26:5
|
||||
|
|
||||
LL | #[rustc_deprecated()] impl S { }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0734`.
|
||||
|
|
|
@ -18,6 +18,7 @@ mod stable {
|
|||
|
||||
#[stable()] struct S;
|
||||
//~^ ERROR stability attributes may not be used outside of the standard library
|
||||
//~| ERROR stability attributes may not be used outside of the standard library
|
||||
|
||||
#[stable()] type T = S;
|
||||
//~^ ERROR stability attributes may not be used outside of the standard library
|
||||
|
|
|
@ -29,17 +29,23 @@ LL | #[stable()] struct S;
|
|||
| ^^^^^^^^^^^
|
||||
|
||||
error[E0734]: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-stable.rs:22:5
|
||||
--> $DIR/issue-43106-gating-of-stable.rs:19:5
|
||||
|
|
||||
LL | #[stable()] struct S;
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error[E0734]: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-stable.rs:23:5
|
||||
|
|
||||
LL | #[stable()] type T = S;
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error[E0734]: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-stable.rs:25:5
|
||||
--> $DIR/issue-43106-gating-of-stable.rs:26:5
|
||||
|
|
||||
LL | #[stable()] impl S { }
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0734`.
|
||||
|
|
|
@ -18,6 +18,7 @@ mod unstable {
|
|||
|
||||
#[unstable()] struct S;
|
||||
//~^ ERROR stability attributes may not be used outside of the standard library
|
||||
//~| ERROR stability attributes may not be used outside of the standard library
|
||||
|
||||
#[unstable()] type T = S;
|
||||
//~^ ERROR stability attributes may not be used outside of the standard library
|
||||
|
|
|
@ -29,17 +29,23 @@ LL | #[unstable()] struct S;
|
|||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0734]: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-unstable.rs:22:5
|
||||
--> $DIR/issue-43106-gating-of-unstable.rs:19:5
|
||||
|
|
||||
LL | #[unstable()] struct S;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0734]: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-unstable.rs:23:5
|
||||
|
|
||||
LL | #[unstable()] type T = S;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error[E0734]: stability attributes may not be used outside of the standard library
|
||||
--> $DIR/issue-43106-gating-of-unstable.rs:25:5
|
||||
--> $DIR/issue-43106-gating-of-unstable.rs:26:5
|
||||
|
|
||||
LL | #[unstable()] impl S { }
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
error: aborting due to 8 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0734`.
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#[doc(include="asdf.md")] //~ ERROR: `#[doc(include)]` is experimental
|
||||
//~| ERROR: `#[doc(include)]` is experimental
|
||||
fn main() {}
|
||||
|
|
|
@ -7,6 +7,15 @@ LL | #[doc(include="asdf.md")]
|
|||
= note: for more information, see https://github.com/rust-lang/rust/issues/44732
|
||||
= help: add `#![feature(external_doc)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0658]: `#[doc(include)]` is experimental
|
||||
--> $DIR/feature-gate-external_doc.rs:1:1
|
||||
|
|
||||
LL | #[doc(include="asdf.md")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/44732
|
||||
= help: add `#![feature(external_doc)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#![warn(nonstandard_style, reason = "the standard should be respected")]
|
||||
//~^ ERROR lint reasons are experimental
|
||||
//~| ERROR lint reasons are experimental
|
||||
//~| ERROR lint reasons are experimental
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -7,6 +7,24 @@ LL | #![warn(nonstandard_style, reason = "the standard should be respected")]
|
|||
= note: for more information, see https://github.com/rust-lang/rust/issues/54503
|
||||
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0658]: lint reasons are experimental
|
||||
--> $DIR/feature-gate-lint-reasons.rs:1:28
|
||||
|
|
||||
LL | #![warn(nonstandard_style, reason = "the standard should be respected")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/54503
|
||||
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
|
||||
|
||||
error[E0658]: lint reasons are experimental
|
||||
--> $DIR/feature-gate-lint-reasons.rs:1:28
|
||||
|
|
||||
LL | #![warn(nonstandard_style, reason = "the standard should be respected")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: for more information, see https://github.com/rust-lang/rust/issues/54503
|
||||
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/auto-trait-regions.rs:44:24
|
||||
--> $DIR/auto-trait-regions.rs:45:24
|
||||
|
|
||||
LL | let a = A(&mut true, &mut true, No);
|
||||
| ^^^^ - temporary value is freed at the end of this statement
|
||||
|
@ -12,7 +12,7 @@ LL | assert_foo(a);
|
|||
= note: consider using a `let` binding to create a longer lived value
|
||||
|
||||
error[E0716]: temporary value dropped while borrowed
|
||||
--> $DIR/auto-trait-regions.rs:44:35
|
||||
--> $DIR/auto-trait-regions.rs:45:35
|
||||
|
|
||||
LL | let a = A(&mut true, &mut true, No);
|
||||
| ^^^^ - temporary value is freed at the end of this statement
|
||||
|
@ -31,7 +31,7 @@ LL | assert_foo(gen);
|
|||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
error: higher-ranked subtype error
|
||||
--> $DIR/auto-trait-regions.rs:48:5
|
||||
--> $DIR/auto-trait-regions.rs:49:5
|
||||
|
|
||||
LL | assert_foo(gen);
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -29,6 +29,7 @@ fn main() {
|
|||
};
|
||||
assert_foo(gen);
|
||||
//~^ ERROR implementation of `Foo` is not general enough
|
||||
//~| ERROR implementation of `Foo` is not general enough
|
||||
|
||||
// Allow impls which matches any lifetime
|
||||
let x = &OnlyFooIfRef(No);
|
||||
|
@ -47,4 +48,5 @@ fn main() {
|
|||
};
|
||||
assert_foo(gen);
|
||||
//~^ ERROR not general enough
|
||||
//~| ERROR not general enough
|
||||
}
|
||||
|
|
|
@ -11,7 +11,19 @@ LL | assert_foo(gen);
|
|||
= note: ...but `Foo` is actually implemented for the type `&'1 OnlyFooIfStaticRef`, for some specific lifetime `'1`
|
||||
|
||||
error: implementation of `Foo` is not general enough
|
||||
--> $DIR/auto-trait-regions.rs:48:5
|
||||
--> $DIR/auto-trait-regions.rs:30:5
|
||||
|
|
||||
LL | auto trait Foo {}
|
||||
| ----------------- trait `Foo` defined here
|
||||
...
|
||||
LL | assert_foo(gen);
|
||||
| ^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||
|
|
||||
= note: `Foo` would have to be implemented for the type `&'0 OnlyFooIfStaticRef`, for any lifetime `'0`...
|
||||
= note: ...but `Foo` is actually implemented for the type `&'1 OnlyFooIfStaticRef`, for some specific lifetime `'1`
|
||||
|
||||
error: implementation of `Foo` is not general enough
|
||||
--> $DIR/auto-trait-regions.rs:49:5
|
||||
|
|
||||
LL | auto trait Foo {}
|
||||
| ----------------- trait `Foo` defined here
|
||||
|
@ -22,5 +34,17 @@ LL | assert_foo(gen);
|
|||
= note: `Foo` would have to be implemented for the type `A<'0, '1>`, for any two lifetimes `'0` and `'1`...
|
||||
= note: ...but `Foo` is actually implemented for the type `A<'_, '2>`, for some specific lifetime `'2`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: implementation of `Foo` is not general enough
|
||||
--> $DIR/auto-trait-regions.rs:49:5
|
||||
|
|
||||
LL | auto trait Foo {}
|
||||
| ----------------- trait `Foo` defined here
|
||||
...
|
||||
LL | assert_foo(gen);
|
||||
| ^^^^^^^^^^ implementation of `Foo` is not general enough
|
||||
|
|
||||
= note: `Foo` would have to be implemented for the type `A<'0, '1>`, for any two lifetimes `'0` and `'1`...
|
||||
= note: ...but `Foo` is actually implemented for the type `A<'_, '2>`, for some specific lifetime `'2`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ LL | | // Not OK -- The forwarding impl for `Foo` requires that `Bar` also
|
|||
... |
|
||||
LL | | foo_hrtb_bar_not(&mut t);
|
||||
| | ------------------------ recursive call site
|
||||
LL | |
|
||||
LL | | }
|
||||
| |_^ cannot return without recursing
|
||||
|
|
||||
|
@ -62,7 +63,7 @@ LL | foo_hrtb_bar_not(&mut t);
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
warning: function cannot return without recursing
|
||||
--> $DIR/hrtb-perfect-forwarding.rs:49:1
|
||||
--> $DIR/hrtb-perfect-forwarding.rs:50:1
|
||||
|
|
||||
LL | / fn foo_hrtb_bar_hrtb<T>(mut t: T)
|
||||
LL | | where T : for<'a> Foo<&'a isize> + for<'b> Bar<&'b isize>
|
||||
|
|
|
@ -44,6 +44,7 @@ fn foo_hrtb_bar_not<'b,T>(mut t: T)
|
|||
// isize>`, we require `T : for<'a> Bar<&'a isize>`, but the where
|
||||
// clause only specifies `T : Bar<&'b isize>`.
|
||||
foo_hrtb_bar_not(&mut t); //~ ERROR mismatched types
|
||||
//~| ERROR mismatched types
|
||||
}
|
||||
|
||||
fn foo_hrtb_bar_hrtb<T>(mut t: T)
|
||||
|
|
|
@ -7,6 +7,15 @@ LL | foo_hrtb_bar_not(&mut t);
|
|||
= note: expected type `Bar<&'a isize>`
|
||||
found type `Bar<&'b isize>`
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/hrtb-perfect-forwarding.rs:46:5
|
||||
|
|
||||
LL | foo_hrtb_bar_not(&mut t);
|
||||
| ^^^^^^^^^^^^^^^^ one type is more general than the other
|
||||
|
|
||||
= note: expected type `Bar<&'a isize>`
|
||||
found type `Bar<&'b isize>`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
|
|
|
@ -11,10 +11,46 @@ LL | let filter = map.filter(|x: &_| true);
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: higher-ranked subtype error
|
||||
--> $DIR/issue-30786.rs:116:17
|
||||
--> $DIR/issue-30786.rs:114:18
|
||||
|
|
||||
LL | let filter = map.filter(|x: &_| true);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: higher-ranked subtype error
|
||||
--> $DIR/issue-30786.rs:114:18
|
||||
|
|
||||
LL | let filter = map.filter(|x: &_| true);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: higher-ranked subtype error
|
||||
--> $DIR/issue-30786.rs:114:18
|
||||
|
|
||||
LL | let filter = map.filter(|x: &_| true);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: higher-ranked subtype error
|
||||
--> $DIR/issue-30786.rs:119:17
|
||||
|
|
||||
LL | let count = filter.count(); // Assert that we still have a valid stream.
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: higher-ranked subtype error
|
||||
--> $DIR/issue-30786.rs:119:17
|
||||
|
|
||||
LL | let count = filter.count(); // Assert that we still have a valid stream.
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: higher-ranked subtype error
|
||||
--> $DIR/issue-30786.rs:119:17
|
||||
|
|
||||
LL | let count = filter.count(); // Assert that we still have a valid stream.
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: higher-ranked subtype error
|
||||
--> $DIR/issue-30786.rs:119:17
|
||||
|
|
||||
LL | let count = filter.count(); // Assert that we still have a valid stream.
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
|
||||
|
|
|
@ -113,7 +113,12 @@ fn main() {
|
|||
//[migrate]~| NOTE implementation of `Stream` is not general enough
|
||||
let filter = map.filter(|x: &_| true);
|
||||
//[nll]~^ ERROR higher-ranked subtype error
|
||||
//[nll]~| ERROR higher-ranked subtype error
|
||||
//[nll]~| ERROR higher-ranked subtype error
|
||||
//[nll]~| ERROR higher-ranked subtype error
|
||||
let count = filter.count(); // Assert that we still have a valid stream.
|
||||
//[nll]~^ ERROR higher-ranked subtype error
|
||||
|
||||
//[nll]~| ERROR higher-ranked subtype error
|
||||
//[nll]~| ERROR higher-ranked subtype error
|
||||
//[nll]~| ERROR higher-ranked subtype error
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ fn main() {
|
|||
fn cycle1() -> impl Clone {
|
||||
//~^ ERROR cycle detected
|
||||
//~| ERROR cycle detected
|
||||
//~| ERROR cycle detected
|
||||
send(cycle2().clone());
|
||||
//~^ ERROR cannot be sent between threads safely
|
||||
|
||||
|
|
|
@ -11,12 +11,12 @@ LL | fn cycle1() -> impl Clone {
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
|
||||
note: ...which requires processing `cycle2::{{opaque}}#0`...
|
||||
--> $DIR/auto-trait-leak.rs:21:16
|
||||
--> $DIR/auto-trait-leak.rs:22:16
|
||||
|
|
||||
LL | fn cycle2() -> impl Clone {
|
||||
| ^^^^^^^^^^
|
||||
note: ...which requires processing `cycle2`...
|
||||
--> $DIR/auto-trait-leak.rs:21:1
|
||||
--> $DIR/auto-trait-leak.rs:22:1
|
||||
|
|
||||
LL | fn cycle2() -> impl Clone {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -47,12 +47,47 @@ LL | fn cycle1() -> impl Clone {
|
|||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
|
||||
note: ...which requires processing `cycle2::{{opaque}}#0`...
|
||||
--> $DIR/auto-trait-leak.rs:21:16
|
||||
--> $DIR/auto-trait-leak.rs:22:16
|
||||
|
|
||||
LL | fn cycle2() -> impl Clone {
|
||||
| ^^^^^^^^^^
|
||||
note: ...which requires processing `cycle2`...
|
||||
--> $DIR/auto-trait-leak.rs:21:1
|
||||
--> $DIR/auto-trait-leak.rs:22:1
|
||||
|
|
||||
LL | fn cycle2() -> impl Clone {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: ...which again requires processing `cycle1::{{opaque}}#0`, completing the cycle
|
||||
note: cycle used when checking item types in top-level module
|
||||
--> $DIR/auto-trait-leak.rs:1:1
|
||||
|
|
||||
LL | / use std::cell::Cell;
|
||||
LL | | use std::rc::Rc;
|
||||
LL | |
|
||||
LL | | fn send<T: Send>(_: T) {}
|
||||
... |
|
||||
LL | | Rc::new(String::from("foo"))
|
||||
LL | | }
|
||||
| |_^
|
||||
|
||||
error[E0391]: cycle detected when processing `cycle1::{{opaque}}#0`
|
||||
--> $DIR/auto-trait-leak.rs:12:16
|
||||
|
|
||||
LL | fn cycle1() -> impl Clone {
|
||||
| ^^^^^^^^^^
|
||||
|
|
||||
note: ...which requires processing `cycle1`...
|
||||
--> $DIR/auto-trait-leak.rs:12:1
|
||||
|
|
||||
LL | fn cycle1() -> impl Clone {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: ...which requires evaluating trait selection obligation `impl std::clone::Clone: std::marker::Send`...
|
||||
note: ...which requires processing `cycle2::{{opaque}}#0`...
|
||||
--> $DIR/auto-trait-leak.rs:22:16
|
||||
|
|
||||
LL | fn cycle2() -> impl Clone {
|
||||
| ^^^^^^^^^^
|
||||
note: ...which requires processing `cycle2`...
|
||||
--> $DIR/auto-trait-leak.rs:22:1
|
||||
|
|
||||
LL | fn cycle2() -> impl Clone {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -70,7 +105,7 @@ LL | | }
|
|||
| |_^
|
||||
|
||||
error[E0277]: `std::rc::Rc<std::string::String>` cannot be sent between threads safely
|
||||
--> $DIR/auto-trait-leak.rs:15:5
|
||||
--> $DIR/auto-trait-leak.rs:16:5
|
||||
|
|
||||
LL | fn send<T: Send>(_: T) {}
|
||||
| ---- ---- required by this bound in `send`
|
||||
|
@ -81,7 +116,7 @@ LL | send(cycle2().clone());
|
|||
= help: within `impl std::clone::Clone`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::string::String>`
|
||||
= note: required because it appears within the type `impl std::clone::Clone`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0277, E0391.
|
||||
For more information about an error, try `rustc --explain E0277`.
|
||||
|
|
|
@ -3,6 +3,8 @@ use non_existent::non_existent; //~ ERROR unresolved import `non_existent`
|
|||
|
||||
#[non_existent] //~ ERROR cannot determine resolution for the attribute macro `non_existent`
|
||||
#[derive(NonExistent)] //~ ERROR cannot determine resolution for the derive macro `NonExistent`
|
||||
//~| ERROR cannot determine resolution for the derive macro `NonExistent`
|
||||
//~| ERROR cannot determine resolution for the derive macro `NonExistent`
|
||||
struct S;
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -29,6 +29,22 @@ LL | #[non_existent]
|
|||
|
|
||||
= note: import resolution is stuck, try simplifying macro imports
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
error: cannot determine resolution for the derive macro `NonExistent`
|
||||
--> $DIR/issue-55457.rs:5:10
|
||||
|
|
||||
LL | #[derive(NonExistent)]
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
= note: import resolution is stuck, try simplifying macro imports
|
||||
|
||||
error: cannot determine resolution for the derive macro `NonExistent`
|
||||
--> $DIR/issue-55457.rs:5:10
|
||||
|
|
||||
LL | #[derive(NonExistent)]
|
||||
| ^^^^^^^^^^^
|
||||
|
|
||||
= note: import resolution is stuck, try simplifying macro imports
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0432`.
|
||||
|
|
|
@ -26,6 +26,7 @@ mod inner1 {
|
|||
}
|
||||
|
||||
exported!(); //~ ERROR `exported` is ambiguous
|
||||
//~| ERROR `exported` is ambiguous
|
||||
|
||||
mod inner2 {
|
||||
define_exported!();
|
||||
|
|
|
@ -21,8 +21,31 @@ LL | use inner1::*;
|
|||
| ^^^^^^^^^
|
||||
= help: consider adding an explicit import of `exported` to disambiguate
|
||||
|
||||
error[E0659]: `exported` is ambiguous (glob import vs macro-expanded name in the same module during import/macro resolution)
|
||||
--> $DIR/local-modularized-tricky-fail-1.rs:28:1
|
||||
|
|
||||
LL | exported!();
|
||||
| ^^^^^^^^ ambiguous name
|
||||
|
|
||||
note: `exported` could refer to the macro defined here
|
||||
--> $DIR/local-modularized-tricky-fail-1.rs:5:5
|
||||
|
|
||||
LL | / macro_rules! exported {
|
||||
LL | | () => ()
|
||||
LL | | }
|
||||
| |_____^
|
||||
...
|
||||
LL | define_exported!();
|
||||
| ------------------- in this macro invocation
|
||||
note: `exported` could also refer to the macro imported here
|
||||
--> $DIR/local-modularized-tricky-fail-1.rs:22:5
|
||||
|
|
||||
LL | use inner1::*;
|
||||
| ^^^^^^^^^
|
||||
= help: consider adding an explicit import of `exported` to disambiguate
|
||||
|
||||
error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
|
||||
--> $DIR/local-modularized-tricky-fail-1.rs:35:5
|
||||
--> $DIR/local-modularized-tricky-fail-1.rs:36:5
|
||||
|
|
||||
LL | panic!();
|
||||
| ^^^^^ ambiguous name
|
||||
|
@ -41,7 +64,7 @@ LL | define_panic!();
|
|||
= help: use `crate::panic` to refer to this macro unambiguously
|
||||
|
||||
error[E0659]: `include` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
|
||||
--> $DIR/local-modularized-tricky-fail-1.rs:46:1
|
||||
--> $DIR/local-modularized-tricky-fail-1.rs:47:1
|
||||
|
|
||||
LL | include!();
|
||||
| ^^^^^^^ ambiguous name
|
||||
|
@ -59,6 +82,6 @@ LL | define_include!();
|
|||
| ------------------ in this macro invocation
|
||||
= help: use `crate::include` to refer to this macro unambiguously
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0659`.
|
||||
|
|
|
@ -14,6 +14,7 @@ mod m1 {
|
|||
mod m2 {
|
||||
use two_macros::*;
|
||||
m! { //~ ERROR ambiguous
|
||||
//~| ERROR ambiguous
|
||||
use foo::m;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,25 @@ LL | m! {
|
|||
| ^ ambiguous name
|
||||
|
|
||||
note: `m` could refer to the macro imported here
|
||||
--> $DIR/macros.rs:17:13
|
||||
--> $DIR/macros.rs:18:13
|
||||
|
|
||||
LL | use foo::m;
|
||||
| ^^^^^^
|
||||
note: `m` could also refer to the macro imported here
|
||||
--> $DIR/macros.rs:15:9
|
||||
|
|
||||
LL | use two_macros::*;
|
||||
| ^^^^^^^^^^^^^
|
||||
= help: consider adding an explicit import of `m` to disambiguate
|
||||
|
||||
error[E0659]: `m` is ambiguous (glob import vs macro-expanded name in the same module during import/macro resolution)
|
||||
--> $DIR/macros.rs:16:5
|
||||
|
|
||||
LL | m! {
|
||||
| ^ ambiguous name
|
||||
|
|
||||
note: `m` could refer to the macro imported here
|
||||
--> $DIR/macros.rs:18:13
|
||||
|
|
||||
LL | use foo::m;
|
||||
| ^^^^^^
|
||||
|
@ -17,23 +35,23 @@ LL | use two_macros::*;
|
|||
= help: consider adding an explicit import of `m` to disambiguate
|
||||
|
||||
error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
|
||||
--> $DIR/macros.rs:29:9
|
||||
--> $DIR/macros.rs:30:9
|
||||
|
|
||||
LL | m! {
|
||||
| ^ ambiguous name
|
||||
|
|
||||
note: `m` could refer to the macro imported here
|
||||
--> $DIR/macros.rs:30:17
|
||||
--> $DIR/macros.rs:31:17
|
||||
|
|
||||
LL | use two_macros::n as m;
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
note: `m` could also refer to the macro imported here
|
||||
--> $DIR/macros.rs:22:9
|
||||
--> $DIR/macros.rs:23:9
|
||||
|
|
||||
LL | use two_macros::m;
|
||||
| ^^^^^^^^^^^^^
|
||||
= help: use `self::m` to refer to this macro unambiguously
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0659`.
|
||||
|
|
|
@ -4,6 +4,7 @@ const C1: &'static mut [usize] = &mut [];
|
|||
static mut S: usize = 3;
|
||||
const C2: &'static mut usize = unsafe { &mut S };
|
||||
//~^ ERROR: constants cannot refer to statics
|
||||
//~| ERROR: constants cannot refer to statics
|
||||
//~| ERROR: references in constants may only refer to immutable values
|
||||
|
||||
fn main() {}
|
||||
|
|
|
@ -13,6 +13,12 @@ error[E0013]: constants cannot refer to statics, use a constant instead
|
|||
LL | const C2: &'static mut usize = unsafe { &mut S };
|
||||
| ^
|
||||
|
||||
error[E0013]: constants cannot refer to statics, use a constant instead
|
||||
--> $DIR/issue-17718-const-bad-values.rs:5:46
|
||||
|
|
||||
LL | const C2: &'static mut usize = unsafe { &mut S };
|
||||
| ^
|
||||
|
||||
error[E0658]: references in constants may only refer to immutable values
|
||||
--> $DIR/issue-17718-const-bad-values.rs:5:41
|
||||
|
|
||||
|
@ -22,7 +28,7 @@ LL | const C2: &'static mut usize = unsafe { &mut S };
|
|||
= note: for more information, see https://github.com/rust-lang/rust/issues/57349
|
||||
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0013, E0658.
|
||||
For more information about an error, try `rustc --explain E0013`.
|
||||
|
|
|
@ -28,6 +28,7 @@ impl<'a> Publisher<'a> for MyStruct<'a> {
|
|||
fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
|
||||
// Not obvious, but there is an implicit lifetime here -------^
|
||||
//~^^ ERROR cannot infer
|
||||
//~| ERROR cannot infer
|
||||
//~| ERROR mismatched types
|
||||
//~| ERROR mismatched types
|
||||
//
|
||||
|
|
|
@ -102,7 +102,49 @@ LL | | }
|
|||
= note: expected `Publisher<'_>`
|
||||
found `Publisher<'_>`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
|
||||
--> $DIR/issue-20831-debruijn.rs:28:5
|
||||
|
|
||||
LL | / fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
|
||||
LL | | // Not obvious, but there is an implicit lifetime here -------^
|
||||
LL | |
|
||||
LL | |
|
||||
... |
|
||||
LL | | self.sub = t;
|
||||
LL | | }
|
||||
| |_____^
|
||||
|
|
||||
note: first, the lifetime cannot outlive the anonymous lifetime #2 defined on the method body at 28:5...
|
||||
--> $DIR/issue-20831-debruijn.rs:28:5
|
||||
|
|
||||
LL | / fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
|
||||
LL | | // Not obvious, but there is an implicit lifetime here -------^
|
||||
LL | |
|
||||
LL | |
|
||||
... |
|
||||
LL | | self.sub = t;
|
||||
LL | | }
|
||||
| |_____^
|
||||
note: ...but the lifetime must also be valid for the lifetime `'a` as defined on the impl at 26:6...
|
||||
--> $DIR/issue-20831-debruijn.rs:26:6
|
||||
|
|
||||
LL | impl<'a> Publisher<'a> for MyStruct<'a> {
|
||||
| ^^
|
||||
note: ...so that the types are compatible
|
||||
--> $DIR/issue-20831-debruijn.rs:28:5
|
||||
|
|
||||
LL | / fn subscribe(&mut self, t : Box<dyn Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
|
||||
LL | | // Not obvious, but there is an implicit lifetime here -------^
|
||||
LL | |
|
||||
LL | |
|
||||
... |
|
||||
LL | | self.sub = t;
|
||||
LL | | }
|
||||
| |_____^
|
||||
= note: expected `Publisher<'_>`
|
||||
found `Publisher<'_>`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0308, E0495.
|
||||
For more information about an error, try `rustc --explain E0308`.
|
||||
|
|
|
@ -7,5 +7,6 @@ fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
|
|||
fn main() {
|
||||
size_of_copy::<dyn Misc + Copy>();
|
||||
//~^ ERROR only auto traits can be used as additional traits in a trait object
|
||||
//~| ERROR only auto traits can be used as additional traits in a trait object
|
||||
//~| ERROR the trait bound `dyn Misc: std::marker::Copy` is not satisfied
|
||||
}
|
||||
|
|
|
@ -9,6 +9,17 @@ LL | size_of_copy::<dyn Misc + Copy>();
|
|||
| first non-auto trait
|
||||
| trait alias used in trait object type (first use)
|
||||
|
||||
error[E0225]: only auto traits can be used as additional traits in a trait object
|
||||
--> $DIR/issue-32963.rs:8:31
|
||||
|
|
||||
LL | size_of_copy::<dyn Misc + Copy>();
|
||||
| ---- ^^^^
|
||||
| | |
|
||||
| | additional non-auto trait
|
||||
| | trait alias used in trait object type (additional use)
|
||||
| first non-auto trait
|
||||
| trait alias used in trait object type (first use)
|
||||
|
||||
error[E0277]: the trait bound `dyn Misc: std::marker::Copy` is not satisfied
|
||||
--> $DIR/issue-32963.rs:8:5
|
||||
|
|
||||
|
@ -18,7 +29,7 @@ LL | fn size_of_copy<T: Copy+?Sized>() -> usize { mem::size_of::<T>() }
|
|||
LL | size_of_copy::<dyn Misc + Copy>();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `dyn Misc`
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0225, E0277.
|
||||
For more information about an error, try `rustc --explain E0225`.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#[derive(Clone,
|
||||
Sync, //~ ERROR cannot find derive macro `Sync` in this scope
|
||||
//~| ERROR cannot find derive macro `Sync` in this scope
|
||||
Copy)]
|
||||
enum Foo {}
|
||||
|
||||
|
|
|
@ -10,5 +10,17 @@ note: unsafe traits like `Sync` should be implemented explicitly
|
|||
LL | Sync,
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to previous error
|
||||
error: cannot find derive macro `Sync` in this scope
|
||||
--> $DIR/issue-33571.rs:2:10
|
||||
|
|
||||
LL | Sync,
|
||||
| ^^^^
|
||||
|
|
||||
note: unsafe traits like `Sync` should be implemented explicitly
|
||||
--> $DIR/issue-33571.rs:2:10
|
||||
|
|
||||
LL | Sync,
|
||||
| ^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue