Auto merge of #147498 - ferrocene:pvdrz/edition-range-gating, r=jieyouxu,fmease

Gate tests with the right edition

This PR guarantees that `./x test --test-args="--edition XXXX" ui` runs correctly with the 2015, 2018 and 2021 editions.

I don't expect this PR to hold up over time but it helps to submit further updates to the `//@ edition` directives of tests where we can use the new range syntax to have a more robust testing across different editions

r? `@fmease`

---

try-job: aarch64-gnu
try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: test-various
try-job: armhf-gnu
This commit is contained in:
bors 2025-11-27 22:37:05 +00:00
commit e6edf3ae53
696 changed files with 2846 additions and 2202 deletions

View file

@ -1,3 +1,4 @@
//@ edition: 2015
//@ compile-flags: --error-format human-annotate-rs -Z unstable-options
pub fn main() {

View file

@ -1,5 +1,5 @@
error[E0412]: cannot find type `Iter` in this scope
--> $DIR/missing-type.rs:4:12
--> $DIR/missing-type.rs:5:12
|
LL | let x: Iter;
| ^^^^ not found in this scope

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
fn empty() {}
fn one_arg<T>(_a: T) {}
fn two_arg_same(_a: i32, _b: i32) {}

View file

@ -1,11 +1,11 @@
error[E0061]: this function takes 0 arguments but 1 argument was supplied
--> $DIR/extra_arguments.rs:19:3
--> $DIR/extra_arguments.rs:20:3
|
LL | empty("");
| ^^^^^ -- unexpected argument of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
--> $DIR/extra_arguments.rs:2:4
|
LL | fn empty() {}
| ^^^^^
@ -16,7 +16,7 @@ LL + empty();
|
error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:20:3
--> $DIR/extra_arguments.rs:21:3
|
LL | empty(1, 1);
| ^^^^^ - - unexpected argument #2 of type `{integer}`
@ -24,7 +24,7 @@ LL | empty(1, 1);
| unexpected argument #1 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
--> $DIR/extra_arguments.rs:2:4
|
LL | fn empty() {}
| ^^^^^
@ -35,13 +35,13 @@ LL + empty();
|
error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:22:3
--> $DIR/extra_arguments.rs:23:3
|
LL | one_arg(1, 1);
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
@ -52,13 +52,13 @@ LL + one_arg(1);
|
error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:23:3
--> $DIR/extra_arguments.rs:24:3
|
LL | one_arg(1, "");
| ^^^^^^^ -- unexpected argument #2 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
@ -69,7 +69,7 @@ LL + one_arg(1);
|
error[E0061]: this function takes 1 argument but 3 arguments were supplied
--> $DIR/extra_arguments.rs:24:3
--> $DIR/extra_arguments.rs:25:3
|
LL | one_arg(1, "", 1.0);
| ^^^^^^^ -- --- unexpected argument #3 of type `{float}`
@ -77,7 +77,7 @@ LL | one_arg(1, "", 1.0);
| unexpected argument #2 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
@ -88,13 +88,13 @@ LL + one_arg(1);
|
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:26:3
--> $DIR/extra_arguments.rs:27:3
|
LL | two_arg_same(1, 1, 1);
| ^^^^^^^^^^^^ - unexpected argument #3 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
--> $DIR/extra_arguments.rs:4:4
|
LL | fn two_arg_same(_a: i32, _b: i32) {}
| ^^^^^^^^^^^^
@ -105,13 +105,13 @@ LL + two_arg_same(1, 1);
|
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:27:3
--> $DIR/extra_arguments.rs:28:3
|
LL | two_arg_same(1, 1, 1.0);
| ^^^^^^^^^^^^ --- unexpected argument #3 of type `{float}`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
--> $DIR/extra_arguments.rs:4:4
|
LL | fn two_arg_same(_a: i32, _b: i32) {}
| ^^^^^^^^^^^^
@ -122,13 +122,13 @@ LL + two_arg_same(1, 1);
|
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:29:3
--> $DIR/extra_arguments.rs:30:3
|
LL | two_arg_diff(1, 1, "");
| ^^^^^^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
@ -139,13 +139,13 @@ LL + two_arg_diff(1, "");
|
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:30:3
--> $DIR/extra_arguments.rs:31:3
|
LL | two_arg_diff(1, "", "");
| ^^^^^^^^^^^^ -- unexpected argument #3 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
@ -156,7 +156,7 @@ LL + two_arg_diff(1, "");
|
error[E0061]: this function takes 2 arguments but 4 arguments were supplied
--> $DIR/extra_arguments.rs:31:3
--> $DIR/extra_arguments.rs:32:3
|
LL | two_arg_diff(1, 1, "", "");
| ^^^^^^^^^^^^ - -- unexpected argument #4 of type `&'static str`
@ -164,7 +164,7 @@ LL | two_arg_diff(1, 1, "", "");
| unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
@ -175,7 +175,7 @@ LL + two_arg_diff(1, "");
|
error[E0061]: this function takes 2 arguments but 4 arguments were supplied
--> $DIR/extra_arguments.rs:32:3
--> $DIR/extra_arguments.rs:33:3
|
LL | two_arg_diff(1, "", 1, "");
| ^^^^^^^^^^^^ - -- unexpected argument #4 of type `&'static str`
@ -183,7 +183,7 @@ LL | two_arg_diff(1, "", 1, "");
| unexpected argument #3 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
@ -194,13 +194,13 @@ LL + two_arg_diff(1, "");
|
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:35:3
--> $DIR/extra_arguments.rs:36:3
|
LL | two_arg_same(1, 1, "");
| ^^^^^^^^^^^^ -- unexpected argument #3 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
--> $DIR/extra_arguments.rs:4:4
|
LL | fn two_arg_same(_a: i32, _b: i32) {}
| ^^^^^^^^^^^^
@ -211,13 +211,13 @@ LL + two_arg_same(1, 1);
|
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:36:3
--> $DIR/extra_arguments.rs:37:3
|
LL | two_arg_diff(1, 1, "");
| ^^^^^^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
@ -228,7 +228,7 @@ LL + two_arg_diff(1, "");
|
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:37:3
--> $DIR/extra_arguments.rs:38:3
|
LL | two_arg_same(
| ^^^^^^^^^^^^
@ -237,7 +237,7 @@ LL | ""
| -- unexpected argument #3 of type `&'static str`
|
note: function defined here
--> $DIR/extra_arguments.rs:3:4
--> $DIR/extra_arguments.rs:4:4
|
LL | fn two_arg_same(_a: i32, _b: i32) {}
| ^^^^^^^^^^^^
@ -249,7 +249,7 @@ LL + 1
|
error[E0061]: this function takes 2 arguments but 3 arguments were supplied
--> $DIR/extra_arguments.rs:43:3
--> $DIR/extra_arguments.rs:44:3
|
LL | two_arg_diff(
| ^^^^^^^^^^^^
@ -258,7 +258,7 @@ LL | 1,
| - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:4:4
--> $DIR/extra_arguments.rs:5:4
|
LL | fn two_arg_diff(_a: i32, _b: &str) {}
| ^^^^^^^^^^^^
@ -268,7 +268,7 @@ LL - 1,
|
error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:8:9
--> $DIR/extra_arguments.rs:9:9
|
LL | empty($x, 1);
| ^^^^^ - unexpected argument #2 of type `{integer}`
@ -280,14 +280,14 @@ LL | foo!(1, ~);
| in this macro invocation
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
--> $DIR/extra_arguments.rs:2:4
|
LL | fn empty() {}
| ^^^^^
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:14:9
--> $DIR/extra_arguments.rs:15:9
|
LL | empty(1, $y);
| ^^^^^ - unexpected argument #1 of type `{integer}`
@ -299,14 +299,14 @@ LL | foo!(~, 1);
| in this macro invocation
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
--> $DIR/extra_arguments.rs:2:4
|
LL | fn empty() {}
| ^^^^^
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0061]: this function takes 0 arguments but 2 arguments were supplied
--> $DIR/extra_arguments.rs:11:9
--> $DIR/extra_arguments.rs:12:9
|
LL | empty($x, $y);
| ^^^^^
@ -319,20 +319,20 @@ LL | foo!(1, 1);
| in this macro invocation
|
note: function defined here
--> $DIR/extra_arguments.rs:1:4
--> $DIR/extra_arguments.rs:2:4
|
LL | fn empty() {}
| ^^^^^
= note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:53:3
--> $DIR/extra_arguments.rs:54:3
|
LL | one_arg(1, panic!());
| ^^^^^^^ -------- unexpected argument #2
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
@ -343,13 +343,13 @@ LL + one_arg(1);
|
error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:54:3
--> $DIR/extra_arguments.rs:55:3
|
LL | one_arg(panic!(), 1);
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
@ -360,13 +360,13 @@ LL + one_arg(panic!());
|
error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:55:3
--> $DIR/extra_arguments.rs:56:3
|
LL | one_arg(stringify!($e), 1);
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^
@ -377,13 +377,13 @@ LL + one_arg(stringify!($e));
|
error[E0061]: this function takes 1 argument but 2 arguments were supplied
--> $DIR/extra_arguments.rs:60:3
--> $DIR/extra_arguments.rs:61:3
|
LL | one_arg(for _ in 1.. {}, 1);
| ^^^^^^^ - unexpected argument #2 of type `{integer}`
|
note: function defined here
--> $DIR/extra_arguments.rs:2:4
--> $DIR/extra_arguments.rs:3:4
|
LL | fn one_arg<T>(_a: T) {}
| ^^^^^^^

View file

@ -1,3 +1,4 @@
//@ edition:2015
// Checks that the #[unsafe(naked)] attribute can be placed on function definitions only.
//
//@ needs-asm-support

View file

@ -1,11 +1,11 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `a`
--> $DIR/naked-invalid-attr.rs:56:5
--> $DIR/naked-invalid-attr.rs:57:5
|
LL | #[::a]
| ^ use of unresolved module or unlinked crate `a`
error: `#[naked]` attribute cannot be used on crates
--> $DIR/naked-invalid-attr.rs:4:1
--> $DIR/naked-invalid-attr.rs:5:1
|
LL | #![unsafe(naked)]
| ^^^^^^^^^^^^^^^^^
@ -13,7 +13,7 @@ LL | #![unsafe(naked)]
= help: `#[naked]` can only be applied to functions
error: `#[naked]` attribute cannot be used on foreign functions
--> $DIR/naked-invalid-attr.rs:9:5
--> $DIR/naked-invalid-attr.rs:10:5
|
LL | #[unsafe(naked)]
| ^^^^^^^^^^^^^^^^
@ -21,7 +21,7 @@ LL | #[unsafe(naked)]
= help: `#[naked]` can be applied to functions and methods
error: `#[naked]` attribute cannot be used on structs
--> $DIR/naked-invalid-attr.rs:13:1
--> $DIR/naked-invalid-attr.rs:14:1
|
LL | #[unsafe(naked)]
| ^^^^^^^^^^^^^^^^
@ -29,7 +29,7 @@ LL | #[unsafe(naked)]
= help: `#[naked]` can only be applied to functions
error: `#[naked]` attribute cannot be used on struct fields
--> $DIR/naked-invalid-attr.rs:16:5
--> $DIR/naked-invalid-attr.rs:17:5
|
LL | #[unsafe(naked)]
| ^^^^^^^^^^^^^^^^
@ -37,7 +37,7 @@ LL | #[unsafe(naked)]
= help: `#[naked]` can only be applied to functions
error: `#[naked]` attribute cannot be used on required trait methods
--> $DIR/naked-invalid-attr.rs:22:5
--> $DIR/naked-invalid-attr.rs:23:5
|
LL | #[unsafe(naked)]
| ^^^^^^^^^^^^^^^^
@ -45,7 +45,7 @@ LL | #[unsafe(naked)]
= help: `#[naked]` can be applied to functions, inherent methods, provided trait methods, and trait methods in impl blocks
error: `#[naked]` attribute cannot be used on closures
--> $DIR/naked-invalid-attr.rs:51:5
--> $DIR/naked-invalid-attr.rs:52:5
|
LL | #[unsafe(naked)]
| ^^^^^^^^^^^^^^^^
@ -53,7 +53,7 @@ LL | #[unsafe(naked)]
= help: `#[naked]` can be applied to functions and methods
error[E0736]: attribute incompatible with `#[unsafe(naked)]`
--> $DIR/naked-invalid-attr.rs:56:3
--> $DIR/naked-invalid-attr.rs:57:3
|
LL | #[::a]
| ^^^ the `::a` attribute is incompatible with `#[unsafe(naked)]`

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-pass
#![allow(dead_code, unreachable_patterns)]
#![allow(ellipsis_inclusive_range_patterns)]

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
#![allow(bare_trait_objects)]
trait Item {
type Core;

View file

@ -1,5 +1,5 @@
error[E0191]: the value of the associated types `Item` and `IntoIter` in `IntoIterator` must be specified
--> $DIR/overlaping-bound-suggestion.rs:6:13
--> $DIR/overlaping-bound-suggestion.rs:7:13
|
LL | inner: <IntoIterator<Item: IntoIterator<Item: >>::IntoIterator as Item>::Core,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: specify the associated types: `IntoIterator<Item: IntoIterator<Item: >, Item = Type, IntoIter = Type>`

View file

@ -1,3 +1,4 @@
//@ edition:2015
//@ run-pass
#![allow(dead_code)]
#![allow(unused_mut)]

View file

@ -1,3 +1,4 @@
//@ edition:2015
// Test that we reliably check the value of the associated type.
#![crate_type = "lib"]

View file

@ -1,5 +1,5 @@
error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == Option<T>`
--> $DIR/associated-types-issue-20346.rs:34:36
--> $DIR/associated-types-issue-20346.rs:35:36
|
LL | fn test_adapter<T, I: Iterator<Item=Option<T>>>(it: I) {
| - found this type parameter
@ -10,14 +10,14 @@ LL | is_iterator_of::<Option<T>, _>(&adapter);
| required by a bound introduced by this call
|
note: expected this to be `Option<T>`
--> $DIR/associated-types-issue-20346.rs:23:17
--> $DIR/associated-types-issue-20346.rs:24:17
|
LL | type Item = T;
| ^
= note: expected enum `Option<T>`
found type parameter `T`
note: required by a bound in `is_iterator_of`
--> $DIR/associated-types-issue-20346.rs:15:34
--> $DIR/associated-types-issue-20346.rs:16:34
|
LL | fn is_iterator_of<A, I: Iterator<Item=A>>(_: &I) {}
| ^^^^^^ required by this bound in `is_iterator_of`

View file

@ -1,3 +1,4 @@
//@ edition:2015
//@ run-pass
#![allow(dead_code)]
#![allow(unused_imports)]

View file

@ -1,3 +1,4 @@
//@ edition:2015
//@ check-pass
#![allow(deprecated)]

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
#![feature(associated_type_defaults)]
// This used to cause an ICE because assoc. type defaults weren't properly

View file

@ -1,17 +1,17 @@
error[E0277]: the trait bound `(dyn ToString + 'static): Default` is not satisfied
--> $DIR/issue-43924.rs:7:45
--> $DIR/issue-43924.rs:8:45
|
LL | type Out: Default + ToString + ?Sized = dyn ToString;
| ^^^^^^^^^^^^ the trait `Default` is not implemented for `(dyn ToString + 'static)`
|
note: required by a bound in `Foo::Out`
--> $DIR/issue-43924.rs:7:15
--> $DIR/issue-43924.rs:8:15
|
LL | type Out: Default + ToString + ?Sized = dyn ToString;
| ^^^^^^^ required by this bound in `Foo::Out`
error[E0599]: no function or associated item named `default` found for trait object `(dyn ToString + 'static)` in the current scope
--> $DIR/issue-43924.rs:14:39
--> $DIR/issue-43924.rs:15:39
|
LL | assert_eq!(<() as Foo<u32>>::Out::default().to_string(), "false");
| ^^^^^^^ function or associated item not found in `(dyn ToString + 'static)`

View file

@ -1,5 +1,6 @@
// Regression test for the projection bug in <https://github.com/rust-lang/rust/issues/123953>
//
//@ edition: 2015
//@ compile-flags: -Zincremental-verify-ich=yes
//@ incremental

View file

@ -1,11 +1,11 @@
error: expected identifier, found `}`
--> $DIR/projection-dyn-associated-type.rs:26:1
--> $DIR/projection-dyn-associated-type.rs:27:1
|
LL | }
| ^ expected identifier
warning: trait objects without an explicit `dyn` are deprecated
--> $DIR/projection-dyn-associated-type.rs:13:28
--> $DIR/projection-dyn-associated-type.rs:14:28
|
LL | impl<T: ?Sized> Mirror for A {
| ^
@ -24,31 +24,31 @@ LL + impl<T: ?Sized, U: A> Mirror for U {
|
error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
--> $DIR/projection-dyn-associated-type.rs:13:6
--> $DIR/projection-dyn-associated-type.rs:14:6
|
LL | impl<T: ?Sized> Mirror for A {
| ^ unconstrained type parameter
error[E0277]: the trait bound `(dyn B + 'static): Mirror` is not satisfied
--> $DIR/projection-dyn-associated-type.rs:22:6
--> $DIR/projection-dyn-associated-type.rs:23:6
|
LL | ) -> &'a <dyn B + 'static as Mirror>::Assoc {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Mirror` is not implemented for `(dyn B + 'static)`
|
help: the trait `Mirror` is implemented for `dyn A`
--> $DIR/projection-dyn-associated-type.rs:13:1
--> $DIR/projection-dyn-associated-type.rs:14:1
|
LL | impl<T: ?Sized> Mirror for A {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0277]: the trait bound `(dyn B + 'static): Mirror` is not satisfied
--> $DIR/projection-dyn-associated-type.rs:22:6
--> $DIR/projection-dyn-associated-type.rs:23:6
|
LL | ) -> &'a <dyn B + 'static as Mirror>::Assoc {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Mirror` is not implemented for `(dyn B + 'static)`
|
help: the trait `Mirror` is implemented for `dyn A`
--> $DIR/projection-dyn-associated-type.rs:13:1
--> $DIR/projection-dyn-associated-type.rs:14:1
|
LL | impl<T: ?Sized> Mirror for A {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,3 +1,4 @@
//@ edition:2015
// Non-builtin attributes do not mess with field visibility resolution (issue #67006).
mod internal {

View file

@ -1,5 +1,5 @@
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
--> $DIR/field-attributes-vis-unresolved.rs:17:12
--> $DIR/field-attributes-vis-unresolved.rs:18:12
|
LL | pub(in nonexistent) field: u8
| ^^^^^^^^^^^ use of unresolved module or unlinked crate `nonexistent`
@ -10,7 +10,7 @@ LL + extern crate nonexistent;
|
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `nonexistent`
--> $DIR/field-attributes-vis-unresolved.rs:22:12
--> $DIR/field-attributes-vis-unresolved.rs:23:12
|
LL | pub(in nonexistent) u8
| ^^^^^^^^^^^ use of unresolved module or unlinked crate `nonexistent`

View file

@ -1,3 +1,4 @@
//@ edition:2015
//@ run-pass
// Parsing of range patterns

View file

@ -1,3 +1,4 @@
//@ edition:2015
//@ dont-require-annotations: NOTE
mod a {

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-13624.rs:9:5
--> $DIR/issue-13624.rs:10:5
|
LL | pub fn get_enum_struct_variant() -> () {
| -- expected `()` because of return type
@ -7,7 +7,7 @@ LL | Enum::EnumStructVariant { x: 1, y: 2, z: 3 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `Enum`
error[E0308]: mismatched types
--> $DIR/issue-13624.rs:22:9
--> $DIR/issue-13624.rs:23:9
|
LL | match enum_struct_variant {
| ------------------- this expression has type `()`

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
fn main() { //~ NOTE expected `()` because of default return type
&panic!()
//~^ ERROR mismatched types

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/issue-5500.rs:2:5
--> $DIR/issue-5500.rs:3:5
|
LL | fn main() {
| - expected `()` because of default return type

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
// Tests that two closures cannot simultaneously have mutable
// and immutable access to the variable. Issue #6801.

View file

@ -1,5 +1,5 @@
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
--> $DIR/borrowck-closures-mut-and-imm.rs:17:14
--> $DIR/borrowck-closures-mut-and-imm.rs:18:14
|
LL | let c1 = || x = 4;
| -- - first borrow occurs due to use of `x` in closure
@ -14,7 +14,7 @@ LL | drop(c1);
| -- mutable borrow later used here
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
--> $DIR/borrowck-closures-mut-and-imm.rs:25:14
--> $DIR/borrowck-closures-mut-and-imm.rs:26:14
|
LL | let c1 = || set(&mut x);
| -- - first borrow occurs due to use of `x` in closure
@ -29,7 +29,7 @@ LL | drop(c1);
| -- mutable borrow later used here
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
--> $DIR/borrowck-closures-mut-and-imm.rs:33:14
--> $DIR/borrowck-closures-mut-and-imm.rs:34:14
|
LL | let c1 = || set(&mut x);
| -- - first borrow occurs due to use of `x` in closure
@ -44,7 +44,7 @@ LL | drop(c1);
| -- mutable borrow later used here
error[E0506]: cannot assign to `x` because it is borrowed
--> $DIR/borrowck-closures-mut-and-imm.rs:41:5
--> $DIR/borrowck-closures-mut-and-imm.rs:42:5
|
LL | let c2 = || x * 5;
| -- - borrow occurs due to use in closure
@ -57,7 +57,7 @@ LL | drop(c2);
| -- borrow later used here
error[E0506]: cannot assign to `x` because it is borrowed
--> $DIR/borrowck-closures-mut-and-imm.rs:49:5
--> $DIR/borrowck-closures-mut-and-imm.rs:50:5
|
LL | let c1 = || get(&x);
| -- - borrow occurs due to use in closure
@ -70,7 +70,7 @@ LL | drop(c1);
| -- borrow later used here
error[E0506]: cannot assign to `*x` because it is borrowed
--> $DIR/borrowck-closures-mut-and-imm.rs:57:5
--> $DIR/borrowck-closures-mut-and-imm.rs:58:5
|
LL | let c1 = || get(&*x);
| -- -- borrow occurs due to use in closure
@ -83,7 +83,7 @@ LL | drop(c1);
| -- borrow later used here
error[E0506]: cannot assign to `*x.f` because it is borrowed
--> $DIR/borrowck-closures-mut-and-imm.rs:69:5
--> $DIR/borrowck-closures-mut-and-imm.rs:70:5
|
LL | let c1 = || get(&*x.f);
| -- ---- borrow occurs due to use in closure
@ -96,7 +96,7 @@ LL | drop(c1);
| -- borrow later used here
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
--> $DIR/borrowck-closures-mut-and-imm.rs:81:14
--> $DIR/borrowck-closures-mut-and-imm.rs:82:14
|
LL | let c1 = || get(&*x.f);
| -- ---- first borrow occurs due to use of `x` in closure

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
// Tests that two closures cannot simultaneously have mutable
// and immutable access to the variable. Issue #6801.

View file

@ -1,17 +1,17 @@
error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
--> $DIR/borrowck-closures-mut-of-imm.rs:9:25
--> $DIR/borrowck-closures-mut-of-imm.rs:10:25
|
LL | let mut c1 = || set(&mut *x);
| ^^^^^^^ cannot borrow as mutable
error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
--> $DIR/borrowck-closures-mut-of-imm.rs:11:25
--> $DIR/borrowck-closures-mut-of-imm.rs:12:25
|
LL | let mut c2 = || set(&mut *x);
| ^^^^^^^ cannot borrow as mutable
error[E0524]: two closures require unique access to `x` at the same time
--> $DIR/borrowck-closures-mut-of-imm.rs:11:18
--> $DIR/borrowck-closures-mut-of-imm.rs:12:18
|
LL | let mut c1 = || set(&mut *x);
| -- -- first borrow occurs due to use of `x` in closure

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
// Tests that two closures cannot simultaneously both have mutable
// access to the variable. Related to issue #6801.

View file

@ -1,5 +1,5 @@
error[E0524]: two closures require unique access to `x` at the same time
--> $DIR/borrowck-closures-mut-of-mut.rs:14:18
--> $DIR/borrowck-closures-mut-of-mut.rs:15:18
|
LL | let mut c1 = || set(&mut *x);
| -- -- first borrow occurs due to use of `x` in closure

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
// Check that closure captures for slice patterns are inferred correctly
fn arr_by_ref(mut x: [String; 3]) {

View file

@ -1,5 +1,5 @@
error[E0502]: cannot borrow `x` as mutable because it is also borrowed as immutable
--> $DIR/borrowck-closures-slice-patterns.rs:7:13
--> $DIR/borrowck-closures-slice-patterns.rs:8:13
|
LL | let f = || {
| -- immutable borrow occurs here
@ -13,7 +13,7 @@ LL | f();
| - immutable borrow later used here
error[E0502]: cannot borrow `x` as immutable because it is also borrowed as mutable
--> $DIR/borrowck-closures-slice-patterns.rs:16:13
--> $DIR/borrowck-closures-slice-patterns.rs:17:13
|
LL | let mut f = || {
| -- mutable borrow occurs here
@ -27,7 +27,7 @@ LL | f();
| - mutable borrow later used here
error[E0382]: borrow of moved value: `x`
--> $DIR/borrowck-closures-slice-patterns.rs:25:5
--> $DIR/borrowck-closures-slice-patterns.rs:26:5
|
LL | fn arr_by_move(x: [String; 3]) {
| - move occurs because `x` has type `[String; 3]`, which does not implement the `Copy` trait
@ -45,7 +45,7 @@ LL | let [y, z @ ..] = x.clone();
| ++++++++
error[E0502]: cannot borrow `*x` as mutable because it is also borrowed as immutable
--> $DIR/borrowck-closures-slice-patterns.rs:33:13
--> $DIR/borrowck-closures-slice-patterns.rs:34:13
|
LL | let f = || {
| -- immutable borrow occurs here
@ -59,7 +59,7 @@ LL | f();
| - immutable borrow later used here
error[E0501]: cannot borrow `x` as immutable because previous closure requires unique access
--> $DIR/borrowck-closures-slice-patterns.rs:42:13
--> $DIR/borrowck-closures-slice-patterns.rs:43:13
|
LL | let mut f = || {
| -- closure construction occurs here
@ -73,7 +73,7 @@ LL | f();
| - first borrow later used here
error[E0382]: borrow of moved value: `x`
--> $DIR/borrowck-closures-slice-patterns.rs:51:5
--> $DIR/borrowck-closures-slice-patterns.rs:52:5
|
LL | fn arr_box_by_move(x: Box<[String; 3]>) {
| - move occurs because `x` has type `Box<[String; 3]>`, which does not implement the `Copy` trait
@ -92,7 +92,7 @@ LL + let [y, z @ ..] = x.clone();
|
error[E0502]: cannot borrow `*x` as mutable because it is also borrowed as immutable
--> $DIR/borrowck-closures-slice-patterns.rs:59:13
--> $DIR/borrowck-closures-slice-patterns.rs:60:13
|
LL | let f = || {
| -- immutable borrow occurs here
@ -106,7 +106,7 @@ LL | f();
| - immutable borrow later used here
error[E0501]: cannot borrow `x` as immutable because previous closure requires unique access
--> $DIR/borrowck-closures-slice-patterns.rs:68:13
--> $DIR/borrowck-closures-slice-patterns.rs:69:13
|
LL | let mut f = || {
| -- closure construction occurs here

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
// Tests that two closures cannot simultaneously have mutable
// access to the variable, whether that mutable access be used
// for direct assignment or for taking mutable ref. Issue #6801.

View file

@ -1,5 +1,5 @@
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-closures-two-mut-fail.rs:16:24
--> $DIR/borrowck-closures-two-mut-fail.rs:17:24
|
LL | let c1 = to_fn_mut(|| x = 4);
| -- - first borrow occurs due to use of `x` in closure
@ -13,7 +13,7 @@ LL | c1;
| -- first borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-closures-two-mut-fail.rs:27:24
--> $DIR/borrowck-closures-two-mut-fail.rs:28:24
|
LL | let c1 = to_fn_mut(|| set(&mut x));
| -- - first borrow occurs due to use of `x` in closure
@ -27,7 +27,7 @@ LL | c1;
| -- first borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-closures-two-mut-fail.rs:34:24
--> $DIR/borrowck-closures-two-mut-fail.rs:35:24
|
LL | let c1 = to_fn_mut(|| x = 5);
| -- - first borrow occurs due to use of `x` in closure
@ -41,7 +41,7 @@ LL | c1;
| -- first borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-closures-two-mut-fail.rs:41:24
--> $DIR/borrowck-closures-two-mut-fail.rs:42:24
|
LL | let c1 = to_fn_mut(|| x = 5);
| -- - first borrow occurs due to use of `x` in closure
@ -56,7 +56,7 @@ LL | c1;
| -- first borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-closures-two-mut-fail.rs:53:24
--> $DIR/borrowck-closures-two-mut-fail.rs:54:24
|
LL | let c1 = to_fn_mut(|| set(&mut *x.f));
| -- ---- first borrow occurs due to use of `x` in closure

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
// Tests that two closures cannot simultaneously have mutable
// access to the variable, whether that mutable access be used
// for direct assignment or for taking mutable ref. Issue #6801.

View file

@ -1,5 +1,5 @@
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-closures-two-mut.rs:12:24
--> $DIR/borrowck-closures-two-mut.rs:13:24
|
LL | let c1 = to_fn_mut(|| x = 4);
| -- - first borrow occurs due to use of `x` in closure
@ -13,7 +13,7 @@ LL | drop((c1, c2));
| -- first borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-closures-two-mut.rs:23:24
--> $DIR/borrowck-closures-two-mut.rs:24:24
|
LL | let c1 = to_fn_mut(|| set(&mut x));
| -- - first borrow occurs due to use of `x` in closure
@ -27,7 +27,7 @@ LL | drop((c1, c2));
| -- first borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-closures-two-mut.rs:30:24
--> $DIR/borrowck-closures-two-mut.rs:31:24
|
LL | let c1 = to_fn_mut(|| x = 5);
| -- - first borrow occurs due to use of `x` in closure
@ -41,7 +41,7 @@ LL | drop((c1, c2));
| -- first borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-closures-two-mut.rs:37:24
--> $DIR/borrowck-closures-two-mut.rs:38:24
|
LL | let c1 = to_fn_mut(|| x = 5);
| -- - first borrow occurs due to use of `x` in closure
@ -56,7 +56,7 @@ LL | drop((c1, c2));
| -- first borrow later used here
error[E0499]: cannot borrow `x` as mutable more than once at a time
--> $DIR/borrowck-closures-two-mut.rs:49:24
--> $DIR/borrowck-closures-two-mut.rs:50:24
|
LL | let c1 = to_fn_mut(|| set(&mut *x.f));
| -- ---- first borrow occurs due to use of `x` in closure

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
struct Foo {
x: isize,
}

View file

@ -1,5 +1,5 @@
error[E0502]: cannot borrow `this.x` as mutable because it is also borrowed as immutable
--> $DIR/borrowck-closures-unique-imm.rs:11:9
--> $DIR/borrowck-closures-unique-imm.rs:12:9
|
LL | let p = &this.x;
| ------- immutable borrow occurs here

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
// Tests that a closure which requires mutable access to the referent
// of an `&mut` requires a "unique" borrow -- that is, the variable to
// be borrowed (here, `x`) will not be borrowed *mutably*, but

View file

@ -1,5 +1,5 @@
error[E0500]: closure requires unique access to `x` but it is already borrowed
--> $DIR/borrowck-closures-unique.rs:26:14
--> $DIR/borrowck-closures-unique.rs:27:14
|
LL | let c1 = || get(x);
| -- - first borrow occurs due to use of `x` in closure
@ -13,7 +13,7 @@ LL | c1;
| -- first borrow later used here
error[E0500]: closure requires unique access to `x` but it is already borrowed
--> $DIR/borrowck-closures-unique.rs:32:14
--> $DIR/borrowck-closures-unique.rs:33:14
|
LL | let c1 = || get(x);
| -- - first borrow occurs due to use of `x` in closure
@ -27,7 +27,7 @@ LL | c1;
| -- first borrow later used here
error[E0524]: two closures require unique access to `x` at the same time
--> $DIR/borrowck-closures-unique.rs:38:14
--> $DIR/borrowck-closures-unique.rs:39:14
|
LL | let c1 = || set(x);
| -- - first borrow occurs due to use of `x` in closure
@ -41,7 +41,7 @@ LL | c1;
| -- first borrow later used here
error[E0594]: cannot assign to `x`, as it is not declared as mutable
--> $DIR/borrowck-closures-unique.rs:43:38
--> $DIR/borrowck-closures-unique.rs:44:38
|
LL | let c1 = |y: &'static mut isize| x = y;
| ^^^^^ cannot assign

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
use std::collections::HashSet;
struct Foo {

View file

@ -1,5 +1,5 @@
error[E0501]: cannot borrow `*f` as mutable because previous closure requires unique access
--> $DIR/borrowck-insert-during-each.rs:16:5
--> $DIR/borrowck-insert-during-each.rs:17:5
|
LL | f.foo(
| ^ --- first borrow later used by call
@ -14,7 +14,7 @@ LL | | })
| |__________^ second borrow occurs here
error[E0500]: closure requires unique access to `f` but it is already borrowed
--> $DIR/borrowck-insert-during-each.rs:18:9
--> $DIR/borrowck-insert-during-each.rs:19:9
|
LL | f.foo(
| - --- first borrow later used by call

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
struct Point { x: isize, y: isize }
trait Methods {

View file

@ -1,5 +1,5 @@
error[E0502]: cannot borrow `p` as mutable because it is also borrowed as immutable
--> $DIR/borrowck-loan-rcvr.rs:23:14
--> $DIR/borrowck-loan-rcvr.rs:24:14
|
LL | p.blockm(|| {
| - ------ ^^ mutable borrow occurs here
@ -10,7 +10,7 @@ LL | p.x = 10;
| --- second borrow occurs due to use of `p` in closure
error[E0502]: cannot borrow `p` as immutable because it is also borrowed as mutable
--> $DIR/borrowck-loan-rcvr.rs:34:5
--> $DIR/borrowck-loan-rcvr.rs:35:5
|
LL | let l = &mut p;
| ------ mutable borrow occurs here

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
// rust-lang/rust#55492: errors detected during MIR-borrowck's
// analysis of a closure body may only be caught when AST-borrowck
// looks at some parent.

View file

@ -1,5 +1,5 @@
error[E0594]: cannot assign to `x`, as it is not declared as mutable
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:9:46
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:10:46
|
LL | let mut c1 = |y: &'static mut isize| x = y;
| ^^^^^ cannot assign
@ -10,7 +10,7 @@ LL | pub fn e(mut x: &'static mut isize) {
| +++
error[E0594]: cannot assign to `x`, as it is not declared as mutable
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:21:50
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:22:50
|
LL | let mut c2 = |y: &'static mut isize| x = y;
| ^^^^^ cannot assign
@ -21,7 +21,7 @@ LL | pub fn ee(mut x: &'static mut isize) {
| +++
error[E0594]: cannot assign to `x`, as it is not declared as mutable
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:35:13
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:36:13
|
LL | x = (1,);
| ^^^^^^^^ cannot assign
@ -32,7 +32,7 @@ LL | pub fn capture_assign_whole(mut x: (i32,)) {
| +++
error[E0594]: cannot assign to `x.0`, as `x` is not declared as mutable
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:41:13
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:42:13
|
LL | x.0 = 1;
| ^^^^^^^ cannot assign
@ -43,7 +43,7 @@ LL | pub fn capture_assign_part(mut x: (i32,)) {
| +++
error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:47:13
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:48:13
|
LL | &mut x;
| ^^^^^^ cannot borrow as mutable
@ -54,7 +54,7 @@ LL | pub fn capture_reborrow_whole(mut x: (i32,)) {
| +++
error[E0596]: cannot borrow `x.0` as mutable, as `x` is not declared as mutable
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:53:13
--> $DIR/issue-55492-borrowck-migrate-scans-parents.rs:54:13
|
LL | &mut x.0;
| ^^^^^^^^ cannot borrow as mutable

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
type Lazy<T> = Box<dyn Fn() -> T + 'static>;
fn test(x: &i32) -> Lazy<i32> {

View file

@ -1,5 +1,5 @@
error: lifetime may not live long enough
--> $DIR/suggest-lt-on-ty-alias-w-generics.rs:4:5
--> $DIR/suggest-lt-on-ty-alias-w-generics.rs:5:5
|
LL | fn test(x: &i32) -> Lazy<i32> {
| - let's call the lifetime of this reference `'1`
@ -17,7 +17,7 @@ LL + type Lazy<'a, T> = Box<dyn Fn() -> T + 'a>;
|
error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
--> $DIR/suggest-lt-on-ty-alias-w-generics.rs:4:14
--> $DIR/suggest-lt-on-ty-alias-w-generics.rs:5:14
|
LL | Box::new(|| {
| ^^ may outlive borrowed value `x`
@ -26,7 +26,7 @@ LL | *x
| -- `x` is borrowed here
|
note: closure is returned here
--> $DIR/suggest-lt-on-ty-alias-w-generics.rs:4:5
--> $DIR/suggest-lt-on-ty-alias-w-generics.rs:5:5
|
LL | / Box::new(|| {
LL | |

View file

@ -1,3 +1,4 @@
//@ edition:2015
// Issue https://github.com/rust-lang/rust/issues/123414
trait MemoryUnit {
extern "C" fn read_word(&mut self) -> u8;

View file

@ -1,5 +1,5 @@
warning: anonymous parameters are deprecated and will be removed in the next edition
--> $DIR/trait-impl-argument-difference-ice.rs:4:30
--> $DIR/trait-impl-argument-difference-ice.rs:5:30
|
LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16;
| ^^^^^^^^^^^^^^^ help: try naming the parameter or explicitly ignoring it: `_: Self::Assoc<'_>`
@ -9,7 +9,7 @@ LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16;
= note: `#[warn(anonymous_parameters)]` (part of `#[warn(rust_2018_compatibility)]`) on by default
error[E0185]: method `read_dword` has a `&self` declaration in the impl, but not in the trait
--> $DIR/trait-impl-argument-difference-ice.rs:14:5
--> $DIR/trait-impl-argument-difference-ice.rs:15:5
|
LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16;
| ------------------------------------------------- trait method declared without `&self`
@ -18,7 +18,7 @@ LL | extern "C" fn read_dword(&'_ self) -> u16 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&self` used in impl
error[E0046]: not all trait items implemented, missing: `read_word`
--> $DIR/trait-impl-argument-difference-ice.rs:12:1
--> $DIR/trait-impl-argument-difference-ice.rs:13:1
|
LL | extern "C" fn read_word(&mut self) -> u8;
| ----------------------------------------- `read_word` from trait
@ -27,13 +27,13 @@ LL | impl MemoryUnit for ROM {
| ^^^^^^^^^^^^^^^^^^^^^^^ missing `read_word` in implementation
error[E0220]: associated type `Assoc` not found for `Self`
--> $DIR/trait-impl-argument-difference-ice.rs:4:36
--> $DIR/trait-impl-argument-difference-ice.rs:5:36
|
LL | extern "C" fn read_dword(Self::Assoc<'_>) -> u16;
| ^^^^^ associated type `Assoc` not found
error[E0596]: cannot borrow `*self` as mutable, as it is behind a `&` reference
--> $DIR/trait-impl-argument-difference-ice.rs:16:19
--> $DIR/trait-impl-argument-difference-ice.rs:17:19
|
LL | let a16 = self.read_word() as u16;
| ^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable
@ -44,7 +44,7 @@ LL | extern "C" fn read_dword(&'_ mut self) -> u16 {
| +++
error[E0596]: cannot borrow `*self` as mutable, as it is behind a `&` reference
--> $DIR/trait-impl-argument-difference-ice.rs:18:19
--> $DIR/trait-impl-argument-difference-ice.rs:19:19
|
LL | let b16 = self.read_word() as u16;
| ^^^^ `self` is a `&` reference, so it cannot be borrowed as mutable

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]

View file

@ -1,5 +1,5 @@
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/issue-90465.rs:17:14
--> $DIR/issue-90465.rs:18:14
|
LL | let c0 = move || {
| ^^^^^^^
@ -12,7 +12,7 @@ LL | }
|
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/disjoint-capture-in-closures.html>
note: the lint level is defined here
--> $DIR/issue-90465.rs:3:9
--> $DIR/issue-90465.rs:4:9
|
LL | #![deny(rust_2021_incompatible_closure_captures)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]
//~^ NOTE: the lint level is defined here

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]
//~^ NOTE: the lint level is defined here

View file

@ -1,5 +1,5 @@
error: changes to closure capture in Rust 2021 will affect which traits the closure implements
--> $DIR/auto_traits.rs:22:19
--> $DIR/auto_traits.rs:23:19
|
LL | thread::spawn(move || unsafe {
| ^^^^^^^ in Rust 2018, this closure implements `Send` as `fptr` implements `Send`, but in Rust 2021, this closure will no longer implement `Send` because `fptr` is not fully captured and `fptr.0` does not implement `Send`
@ -9,7 +9,7 @@ LL | *fptr.0 = 20;
|
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/disjoint-capture-in-closures.html>
note: the lint level is defined here
--> $DIR/auto_traits.rs:2:9
--> $DIR/auto_traits.rs:3:9
|
LL | #![deny(rust_2021_incompatible_closure_captures)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -23,7 +23,7 @@ LL ~ } }).join().unwrap();
|
error: changes to closure capture in Rust 2021 will affect which traits the closure implements
--> $DIR/auto_traits.rs:42:19
--> $DIR/auto_traits.rs:43:19
|
LL | thread::spawn(move || unsafe {
| ^^^^^^^
@ -45,7 +45,7 @@ LL ~ } }).join().unwrap();
|
error: changes to closure capture in Rust 2021 will affect drop order and which traits the closure implements
--> $DIR/auto_traits.rs:67:13
--> $DIR/auto_traits.rs:68:13
|
LL | let c = || {
| ^^ in Rust 2018, this closure implements `Clone` as `f` implements `Clone`, but in Rust 2021, this closure will no longer implement `Clone` because `f` is not fully captured and `f.1` does not implement `Clone`

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]

View file

@ -1,5 +1,5 @@
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/insignificant_drop_attr_migrations.rs:39:13
--> $DIR/insignificant_drop_attr_migrations.rs:40:13
|
LL | let c = || {
| ^^
@ -12,7 +12,7 @@ LL | }
|
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/disjoint-capture-in-closures.html>
note: the lint level is defined here
--> $DIR/insignificant_drop_attr_migrations.rs:3:9
--> $DIR/insignificant_drop_attr_migrations.rs:4:9
|
LL | #![deny(rust_2021_incompatible_closure_captures)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -23,7 +23,7 @@ LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/insignificant_drop_attr_migrations.rs:59:13
--> $DIR/insignificant_drop_attr_migrations.rs:60:13
|
LL | let c = move || {
| ^^^^^^^

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
// See https://github.com/rust-lang/rust/issues/87955

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
// See https://github.com/rust-lang/rust/issues/87955

View file

@ -1,5 +1,5 @@
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/macro.rs:19:13
--> $DIR/macro.rs:20:13
|
LL | let _ = || dbg!(a.0);
| ^^ --- in Rust 2018, this closure captures all of `a`, but in Rust 2021, it will only capture `a.0`
@ -9,7 +9,7 @@ LL | }
|
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/disjoint-capture-in-closures.html>
note: the lint level is defined here
--> $DIR/macro.rs:5:9
--> $DIR/macro.rs:6:9
|
LL | #![deny(rust_2021_incompatible_closure_captures)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]
//~^ NOTE: the lint level is defined here

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]
//~^ NOTE: the lint level is defined here

View file

@ -1,5 +1,5 @@
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/migrations_rustfix.rs:19:13
--> $DIR/migrations_rustfix.rs:20:13
|
LL | let c = || {
| ^^
@ -12,7 +12,7 @@ LL | }
|
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/disjoint-capture-in-closures.html>
note: the lint level is defined here
--> $DIR/migrations_rustfix.rs:2:9
--> $DIR/migrations_rustfix.rs:3:9
|
LL | #![deny(rust_2021_incompatible_closure_captures)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -23,7 +23,7 @@ LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/migrations_rustfix.rs:33:13
--> $DIR/migrations_rustfix.rs:34:13
|
LL | let c = || t.0;
| ^^ --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0`

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
//@ needs-unwind

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
//@ needs-unwind

View file

@ -1,5 +1,5 @@
error: changes to closure capture in Rust 2021 will affect which traits the closure implements
--> $DIR/mir_calls_to_shims.rs:20:38
--> $DIR/mir_calls_to_shims.rs:21:38
|
LL | let result = panic::catch_unwind(move || {
| ^^^^^^^
@ -12,7 +12,7 @@ LL | f.0()
|
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/disjoint-capture-in-closures.html>
note: the lint level is defined here
--> $DIR/mir_calls_to_shims.rs:4:9
--> $DIR/mir_calls_to_shims.rs:5:9
|
LL | #![deny(rust_2021_incompatible_closure_captures)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]
//~^ NOTE: the lint level is defined here

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]
//~^ NOTE: the lint level is defined here

View file

@ -1,5 +1,5 @@
error: changes to closure capture in Rust 2021 will affect drop order and which traits the closure implements
--> $DIR/multi_diagnostics.rs:37:13
--> $DIR/multi_diagnostics.rs:38:13
|
LL | let c = || {
| ^^ in Rust 2018, this closure implements `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure will no longer implement `Clone` because `f1` is not fully captured and `f1.0` does not implement `Clone`
@ -15,7 +15,7 @@ LL | }
|
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/disjoint-capture-in-closures.html>
note: the lint level is defined here
--> $DIR/multi_diagnostics.rs:2:9
--> $DIR/multi_diagnostics.rs:3:9
|
LL | #![deny(rust_2021_incompatible_closure_captures)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -26,7 +26,7 @@ LL + let _ = (&f1, &f2);
|
error: changes to closure capture in Rust 2021 will affect which traits the closure implements
--> $DIR/multi_diagnostics.rs:56:13
--> $DIR/multi_diagnostics.rs:57:13
|
LL | let c = || {
| ^^ in Rust 2018, this closure implements `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure will no longer implement `Clone` because `f1` is not fully captured and `f1.0` does not implement `Clone`
@ -42,7 +42,7 @@ LL + let _ = &f1;
|
error: changes to closure capture in Rust 2021 will affect which traits the closure implements
--> $DIR/multi_diagnostics.rs:81:13
--> $DIR/multi_diagnostics.rs:82:13
|
LL | let c = || {
| ^^
@ -64,7 +64,7 @@ LL + let _ = &f1;
|
error: changes to closure capture in Rust 2021 will affect drop order and which traits the closure implements
--> $DIR/multi_diagnostics.rs:100:13
--> $DIR/multi_diagnostics.rs:101:13
|
LL | let c = || {
| ^^ in Rust 2018, this closure implements `Clone` as `f1` implements `Clone`, but in Rust 2021, this closure will no longer implement `Clone` because `f1` is not fully captured and `f1.0` does not implement `Clone`
@ -89,7 +89,7 @@ LL + let _ = &f1;
|
error: changes to closure capture in Rust 2021 will affect which traits the closure implements
--> $DIR/multi_diagnostics.rs:133:19
--> $DIR/multi_diagnostics.rs:134:19
|
LL | thread::spawn(move || unsafe {
| ^^^^^^^

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]

View file

@ -1,5 +1,5 @@
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/precise.rs:20:13
--> $DIR/precise.rs:21:13
|
LL | let c = || {
| ^^
@ -12,7 +12,7 @@ LL | }
|
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/disjoint-capture-in-closures.html>
note: the lint level is defined here
--> $DIR/precise.rs:3:9
--> $DIR/precise.rs:4:9
|
LL | #![deny(rust_2021_incompatible_closure_captures)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -23,7 +23,7 @@ LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/precise.rs:45:13
--> $DIR/precise.rs:46:13
|
LL | let c = || {
| ^^

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]
//~^ NOTE: the lint level is defined here

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ run-rustfix
#![deny(rust_2021_incompatible_closure_captures)]
//~^ NOTE: the lint level is defined here

View file

@ -1,5 +1,5 @@
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:25:13
--> $DIR/significant_drop.rs:26:13
|
LL | let c = || {
| ^^
@ -22,7 +22,7 @@ LL | }
|
= note: for more information, see <https://doc.rust-lang.org/edition-guide/rust-2021/disjoint-capture-in-closures.html>
note: the lint level is defined here
--> $DIR/significant_drop.rs:2:9
--> $DIR/significant_drop.rs:3:9
|
LL | #![deny(rust_2021_incompatible_closure_captures)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -33,7 +33,7 @@ LL + let _ = (&t, &t1, &t2);
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:50:13
--> $DIR/significant_drop.rs:51:13
|
LL | let c = || {
| ^^
@ -58,7 +58,7 @@ LL + let _ = (&t, &t1);
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:71:13
--> $DIR/significant_drop.rs:72:13
|
LL | let c = || {
| ^^
@ -77,7 +77,7 @@ LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:91:13
--> $DIR/significant_drop.rs:92:13
|
LL | let c = || {
| ^^
@ -96,7 +96,7 @@ LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:109:13
--> $DIR/significant_drop.rs:110:13
|
LL | let c = || {
| ^^
@ -115,7 +115,7 @@ LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:125:13
--> $DIR/significant_drop.rs:126:13
|
LL | let c = || {
| ^^
@ -134,7 +134,7 @@ LL + let _ = &t;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:143:13
--> $DIR/significant_drop.rs:144:13
|
LL | let c = move || {
| ^^^^^^^
@ -158,7 +158,7 @@ LL + let _ = (&t1, &t);
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:163:21
--> $DIR/significant_drop.rs:164:21
|
LL | let c = || {
| ^^
@ -177,7 +177,7 @@ LL + let _ = &tuple;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:181:17
--> $DIR/significant_drop.rs:182:17
|
LL | let c = || {
| ^^
@ -196,7 +196,7 @@ LL + let _ = &tuple;
|
error: changes to closure capture in Rust 2021 will affect drop order
--> $DIR/significant_drop.rs:201:18
--> $DIR/significant_drop.rs:202:18
|
LL | let _c = || tup.0;
| ^^ ----- in Rust 2018, this closure captures all of `tup`, but in Rust 2021, it will only capture `tup.0`

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
fn bar<F>(blk: F) where F: FnOnce() + 'static {
}

View file

@ -1,5 +1,5 @@
error[E0521]: borrowed data escapes outside of function
--> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5
--> $DIR/closure-bounds-static-cant-capture-borrowed.rs:6:5
|
LL | fn foo(x: &()) {
| - - let's call the lifetime of this reference `'1`
@ -16,7 +16,7 @@ LL | | })
| argument requires that `'1` must outlive `'static`
error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
--> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:9
--> $DIR/closure-bounds-static-cant-capture-borrowed.rs:6:9
|
LL | bar(|| {
| ^^ may outlive borrowed value `x`
@ -25,7 +25,7 @@ LL | let _ = x;
| - `x` is borrowed here
|
note: function requires argument type to outlive `'static`
--> $DIR/closure-bounds-static-cant-capture-borrowed.rs:5:5
--> $DIR/closure-bounds-static-cant-capture-borrowed.rs:6:5
|
LL | / bar(|| {
LL | |

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//! Test that closures only implement `Clone` if all captured values implement `Clone`.
//!
//! When a closure captures variables from its environment, it can only be cloned

View file

@ -1,14 +1,14 @@
error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{closure@$DIR/closure-clone-requires-captured-clone.rs:13:19: 13:26}`
--> $DIR/closure-clone-requires-captured-clone.rs:17:13
error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{closure@$DIR/closure-clone-requires-captured-clone.rs:14:19: 14:26}`
--> $DIR/closure-clone-requires-captured-clone.rs:18:13
|
LL | let closure = move || {
| ------- within this `{closure@$DIR/closure-clone-requires-captured-clone.rs:13:19: 13:26}`
| ------- within this `{closure@$DIR/closure-clone-requires-captured-clone.rs:14:19: 14:26}`
...
LL | closure.clone();
| ^^^^^ within `{closure@$DIR/closure-clone-requires-captured-clone.rs:13:19: 13:26}`, the trait `Clone` is not implemented for `NonClone`
| ^^^^^ within `{closure@$DIR/closure-clone-requires-captured-clone.rs:14:19: 14:26}`, the trait `Clone` is not implemented for `NonClone`
|
note: required because it's used within this closure
--> $DIR/closure-clone-requires-captured-clone.rs:13:19
--> $DIR/closure-clone-requires-captured-clone.rs:14:19
|
LL | let closure = move || {
| ^^^^^^^

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
// Regression test for #25954: detect and reject a closure type that
// references itself.

View file

@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/closure-referencing-itself-issue-25954.rs:15:13
--> $DIR/closure-referencing-itself-issue-25954.rs:16:13
|
LL | let q = || p.b.set(5i32);
| ^^^^^^^^^^^^^^^^ cyclic type of infinite size

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
// Creating a stack closure which references a box and then
// transferring ownership of the box before invoking the stack
// closure results in a crash.

View file

@ -1,5 +1,5 @@
error[E0505]: cannot move out of `x` because it is borrowed
--> $DIR/issue-6801.rs:19:13
--> $DIR/issue-6801.rs:20:13
|
LL | let sq = || { *x * *x };
| -- -- borrow occurs due to use in closure

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
fn foo(x: &mut u32) {
let bar = || { foo(x); };
bar(); //~ ERROR cannot borrow

View file

@ -1,5 +1,5 @@
error[E0596]: cannot borrow `bar` as mutable, as it is not declared as mutable
--> $DIR/issue-81700-mut-borrow.rs:3:5
--> $DIR/issue-81700-mut-borrow.rs:4:5
|
LL | let bar = || { foo(x); };
| - calling `bar` requires mutable binding due to mutable borrow of `x`

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
fn to_fn_once<F: FnOnce()>(f: F) -> F {
f
}

View file

@ -1,8 +1,8 @@
error[E0382]: use of moved value: `c`
--> $DIR/closure-print-generic-1.rs:17:5
--> $DIR/closure-print-generic-1.rs:18:5
|
LL | let c = to_fn_once(move || {
| - move occurs because `c` has type `{closure@$DIR/closure-print-generic-1.rs:12:24: 12:31}`, which does not implement the `Copy` trait
| - move occurs because `c` has type `{closure@$DIR/closure-print-generic-1.rs:13:24: 13:31}`, which does not implement the `Copy` trait
...
LL | c();
| --- `c` moved due to this call
@ -10,7 +10,7 @@ LL | c();
| ^ value used here after move
|
note: this value implements `FnOnce`, which causes it to be moved when called
--> $DIR/closure-print-generic-1.rs:16:5
--> $DIR/closure-print-generic-1.rs:17:5
|
LL | c();
| ^

View file

@ -1,3 +1,4 @@
//@ edition:2015..2021
//@ compile-flags: -Zverbose-internals
fn to_fn_once<F:FnOnce()>(f: F) -> F { f }

View file

@ -1,5 +1,5 @@
error[E0382]: use of moved value: `c`
--> $DIR/closure-print-generic-verbose-1.rs:17:5
--> $DIR/closure-print-generic-verbose-1.rs:18:5
|
LL | let c = to_fn_once(move|| {
| - move occurs because `c` has type `{f<T>::{closure#0} closure_kind_ty=i32 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=(Foo<&'?9 str>, T)}`, which does not implement the `Copy` trait
@ -10,7 +10,7 @@ LL | c();
| ^ value used here after move
|
note: this value implements `FnOnce`, which causes it to be moved when called
--> $DIR/closure-print-generic-verbose-1.rs:16:5
--> $DIR/closure-print-generic-verbose-1.rs:17:5
|
LL | c();
| ^

View file

@ -1,3 +1,4 @@
//@ edition:2015
// Tests that methods that implement a trait cannot be invoked
// unless the trait is imported.

View file

@ -1,5 +1,5 @@
error[E0599]: no method named `the_fn` found for reference `&TheStruct` in the current scope
--> $DIR/coherence_inherent.rs:31:11
--> $DIR/coherence_inherent.rs:32:11
|
LL | s.the_fn();
| ^^^^^^ method not found in `&TheStruct`

View file

@ -1,3 +1,4 @@
//@ edition:2015
//@ aux-build:coherence_inherent_cc_lib.rs
// Tests that methods that implement a trait cannot be invoked

View file

@ -1,5 +1,5 @@
error[E0599]: no method named `the_fn` found for reference `&TheStruct` in the current scope
--> $DIR/coherence_inherent_cc.rs:23:11
--> $DIR/coherence_inherent_cc.rs:24:11
|
LL | s.the_fn();
| ^^^^^^ method not found in `&TheStruct`

View file

@ -1,5 +1,6 @@
// Regression test for issue #89358.
//@ edition: 2015..2021
//@ compile-flags: --cfg a"
//~? RAW unterminated double quote string

View file

@ -1,3 +1,4 @@
//@ edition:2015
#![feature(cfg_accessible)]
mod m {

View file

@ -1,23 +1,23 @@
error[E0425]: cannot find value `ExistingPrivate` in this scope
--> $DIR/cfg_accessible.rs:52:5
--> $DIR/cfg_accessible.rs:53:5
|
LL | ExistingPrivate;
| ^^^^^^^^^^^^^^^ not found in this scope
|
note: unit struct `m::ExistingPrivate` exists but is inaccessible
--> $DIR/cfg_accessible.rs:5:5
--> $DIR/cfg_accessible.rs:6:5
|
LL | struct ExistingPrivate;
| ^^^^^^^^^^^^^^^^^^^^^^^ not accessible
error[E0425]: cannot find value `NonExistingPrivate` in this scope
--> $DIR/cfg_accessible.rs:53:5
--> $DIR/cfg_accessible.rs:54:5
|
LL | NonExistingPrivate;
| ^^^^^^^^^^^^^^^^^^ not found in this scope
error[E0425]: cannot find value `NonExistingTraitAlias` in this scope
--> $DIR/cfg_accessible.rs:54:5
--> $DIR/cfg_accessible.rs:55:5
|
LL | NonExistingTraitAlias;
| ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

View file

@ -1,3 +1,4 @@
//@ edition:2015
#![feature(associated_const_equality)]
pub enum Mode {

Some files were not shown because too many files have changed in this diff Show more