Move some issues into the issues folder
This commit is contained in:
parent
59762baf8a
commit
d289a5ba40
14 changed files with 0 additions and 0 deletions
18
src/test/ui/issues/issue-59508-1.rs
Normal file
18
src/test/ui/issues/issue-59508-1.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#![allow(dead_code)]
|
||||
#![feature(const_generics)]
|
||||
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
|
||||
|
||||
// This test checks that generic parameter re-ordering diagnostic suggestions mention that
|
||||
// consts come after types and lifetimes when the `const_generics` feature is enabled.
|
||||
// We cannot run rustfix on this test because of the above const generics warning.
|
||||
|
||||
struct A;
|
||||
|
||||
impl A {
|
||||
pub fn do_things<T, 'a, 'b: 'a>() {
|
||||
//~^ ERROR lifetime parameters must be declared prior to type parameters
|
||||
println!("panic");
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
14
src/test/ui/issues/issue-59508-1.stderr
Normal file
14
src/test/ui/issues/issue-59508-1.stderr
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
|
||||
--> $DIR/issue-59508-1.rs:2:12
|
||||
|
|
||||
LL | #![feature(const_generics)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: lifetime parameters must be declared prior to type parameters
|
||||
--> $DIR/issue-59508-1.rs:12:25
|
||||
|
|
||||
LL | pub fn do_things<T, 'a, 'b: 'a>() {
|
||||
| ----^^--^^----- help: reorder the parameters: lifetimes, then types, then consts: `<'a, 'b: 'a, T>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
16
src/test/ui/issues/issue-59508.fixed
Normal file
16
src/test/ui/issues/issue-59508.fixed
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// run-rustfix
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
// This test checks that generic parameter re-ordering diagnostic suggestions contain bounds.
|
||||
|
||||
struct A;
|
||||
|
||||
impl A {
|
||||
pub fn do_things<'a, 'b: 'a, T>() {
|
||||
//~^ ERROR lifetime parameters must be declared prior to type parameters
|
||||
println!("panic");
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
16
src/test/ui/issues/issue-59508.rs
Normal file
16
src/test/ui/issues/issue-59508.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// run-rustfix
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
||||
// This test checks that generic parameter re-ordering diagnostic suggestions contain bounds.
|
||||
|
||||
struct A;
|
||||
|
||||
impl A {
|
||||
pub fn do_things<T, 'a, 'b: 'a>() {
|
||||
//~^ ERROR lifetime parameters must be declared prior to type parameters
|
||||
println!("panic");
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
8
src/test/ui/issues/issue-59508.stderr
Normal file
8
src/test/ui/issues/issue-59508.stderr
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
error: lifetime parameters must be declared prior to type parameters
|
||||
--> $DIR/issue-59508.rs:10:25
|
||||
|
|
||||
LL | pub fn do_things<T, 'a, 'b: 'a>() {
|
||||
| ----^^--^^----- help: reorder the parameters: lifetimes, then types: `<'a, 'b: 'a, T>`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
17
src/test/ui/issues/issue-59756.fixed
Normal file
17
src/test/ui/issues/issue-59756.fixed
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// run-rustfix
|
||||
|
||||
#![allow(warnings)]
|
||||
|
||||
struct A;
|
||||
struct B;
|
||||
|
||||
fn foo() -> Result<A, B> {
|
||||
Ok(A)
|
||||
}
|
||||
|
||||
fn bar() -> Result<A, B> {
|
||||
foo()
|
||||
//~^ ERROR try expression alternatives have incompatible types [E0308]
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
17
src/test/ui/issues/issue-59756.rs
Normal file
17
src/test/ui/issues/issue-59756.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// run-rustfix
|
||||
|
||||
#![allow(warnings)]
|
||||
|
||||
struct A;
|
||||
struct B;
|
||||
|
||||
fn foo() -> Result<A, B> {
|
||||
Ok(A)
|
||||
}
|
||||
|
||||
fn bar() -> Result<A, B> {
|
||||
foo()?
|
||||
//~^ ERROR try expression alternatives have incompatible types [E0308]
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
15
src/test/ui/issues/issue-59756.stderr
Normal file
15
src/test/ui/issues/issue-59756.stderr
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
error[E0308]: try expression alternatives have incompatible types
|
||||
--> $DIR/issue-59756.rs:13:5
|
||||
|
|
||||
LL | foo()?
|
||||
| ^^^^^-
|
||||
| | |
|
||||
| | help: try removing this `?`
|
||||
| expected enum `std::result::Result`, found struct `A`
|
||||
|
|
||||
= note: expected type `std::result::Result<A, B>`
|
||||
found type `A`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0308`.
|
||||
136
src/test/ui/issues/issue-59764.rs
Normal file
136
src/test/ui/issues/issue-59764.rs
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
// aux-build:issue-59764.rs
|
||||
// compile-flags:--extern issue_59764
|
||||
// edition:2018
|
||||
|
||||
#![allow(warnings)]
|
||||
|
||||
// This tests the suggestion to import macros from the root of a crate. This aims to capture
|
||||
// the case where a user attempts to import a macro from the definition location instead of the
|
||||
// root of the crate and the macro is annotated with `#![macro_export]`.
|
||||
|
||||
// Edge cases..
|
||||
|
||||
mod multiple_imports_same_line_at_end {
|
||||
use issue_59764::foo::{baz, makro};
|
||||
//~^ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
}
|
||||
|
||||
mod multiple_imports_multiline_at_end_trailing_comma {
|
||||
use issue_59764::foo::{
|
||||
baz,
|
||||
makro, //~ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
};
|
||||
}
|
||||
|
||||
mod multiple_imports_multiline_at_end {
|
||||
use issue_59764::foo::{
|
||||
baz,
|
||||
makro //~ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
};
|
||||
}
|
||||
|
||||
mod multiple_imports_same_line_in_middle {
|
||||
use issue_59764::foo::{baz, makro, foobar};
|
||||
//~^ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
}
|
||||
|
||||
mod multiple_imports_multiline_in_middle_trailing_comma {
|
||||
use issue_59764::foo::{
|
||||
baz,
|
||||
makro, //~ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
foobar,
|
||||
};
|
||||
}
|
||||
|
||||
mod multiple_imports_multiline_in_middle {
|
||||
use issue_59764::foo::{
|
||||
baz,
|
||||
makro, //~ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
foobar
|
||||
};
|
||||
}
|
||||
|
||||
mod nested_imports {
|
||||
use issue_59764::{foobaz, foo::makro};
|
||||
//~^ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
}
|
||||
|
||||
mod nested_multiple_imports {
|
||||
use issue_59764::{foobaz, foo::{baz, makro}};
|
||||
//~^ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
}
|
||||
|
||||
mod nested_multiline_multiple_imports_trailing_comma {
|
||||
use issue_59764::{
|
||||
foobaz,
|
||||
foo::{
|
||||
baz,
|
||||
makro, //~ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
mod nested_multiline_multiple_imports {
|
||||
use issue_59764::{
|
||||
foobaz,
|
||||
foo::{
|
||||
baz,
|
||||
makro //~ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
mod doubly_nested_multiple_imports {
|
||||
use issue_59764::{foobaz, foo::{baz, makro, barbaz::{barfoo}}};
|
||||
//~^ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
}
|
||||
|
||||
mod doubly_multiline_nested_multiple_imports {
|
||||
use issue_59764::{
|
||||
foobaz,
|
||||
foo::{
|
||||
baz,
|
||||
makro, //~ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
barbaz::{
|
||||
barfoo,
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
mod renamed_import {
|
||||
use issue_59764::foo::makro as baz;
|
||||
//~^ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
}
|
||||
|
||||
mod renamed_multiple_imports {
|
||||
use issue_59764::foo::{baz, makro as foobar};
|
||||
//~^ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
}
|
||||
|
||||
mod lots_of_whitespace {
|
||||
use
|
||||
issue_59764::{
|
||||
|
||||
foobaz,
|
||||
|
||||
|
||||
foo::{baz,
|
||||
|
||||
makro as foobar} //~ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
// Simple case..
|
||||
|
||||
use issue_59764::foo::makro;
|
||||
//~^ ERROR unresolved import `issue_59764::foo::makro` [E0432]
|
||||
|
||||
makro!(bar);
|
||||
//~^ ERROR cannot determine resolution for the macro `makro`
|
||||
|
||||
fn main() {
|
||||
bar();
|
||||
//~^ ERROR cannot find function `bar` in this scope [E0425]
|
||||
}
|
||||
241
src/test/ui/issues/issue-59764.stderr
Normal file
241
src/test/ui/issues/issue-59764.stderr
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:14:33
|
||||
|
|
||||
LL | use issue_59764::foo::{baz, makro};
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro, foo::{baz}};
|
||||
| ^^^^^^^^^ --^^
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:21:9
|
||||
|
|
||||
LL | makro,
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro, foo::{
|
||||
LL | baz,
|
||||
LL |
|
||||
LL | }};
|
||||
|
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:28:9
|
||||
|
|
||||
LL | makro
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro, foo::{
|
||||
LL | baz,
|
||||
LL |
|
||||
LL | }};
|
||||
|
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:33:33
|
||||
|
|
||||
LL | use issue_59764::foo::{baz, makro, foobar};
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro, foo::{baz, foobar}};
|
||||
| ^^^^^^^^^ -- ^^
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:40:9
|
||||
|
|
||||
LL | makro,
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro, foo::{
|
||||
LL | baz,
|
||||
LL |
|
||||
LL | foobar,
|
||||
LL | }};
|
||||
|
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:48:9
|
||||
|
|
||||
LL | makro,
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro, foo::{
|
||||
LL | baz,
|
||||
LL |
|
||||
LL | foobar
|
||||
LL | }};
|
||||
|
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:54:31
|
||||
|
|
||||
LL | use issue_59764::{foobaz, foo::makro};
|
||||
| ^^^^^^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro, foobaz};
|
||||
| ^^^^^^^ --
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:59:42
|
||||
|
|
||||
LL | use issue_59764::{foobaz, foo::{baz, makro}};
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro, foobaz, foo::{baz}};
|
||||
| ^^^^^^^ --
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:68:13
|
||||
|
|
||||
LL | makro,
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro,
|
||||
LL | foobaz,
|
||||
LL | foo::{
|
||||
LL | baz,
|
||||
LL |
|
||||
|
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:78:13
|
||||
|
|
||||
LL | makro
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro,
|
||||
LL | foobaz,
|
||||
LL | foo::{
|
||||
LL | baz,
|
||||
LL |
|
||||
|
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:84:42
|
||||
|
|
||||
LL | use issue_59764::{foobaz, foo::{baz, makro, barbaz::{barfoo}}};
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro, foobaz, foo::{baz, barbaz::{barfoo}}};
|
||||
| ^^^^^^^ --
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:93:13
|
||||
|
|
||||
LL | makro,
|
||||
| ^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro,
|
||||
LL | foobaz,
|
||||
LL | foo::{
|
||||
LL | baz,
|
||||
LL |
|
||||
|
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:102:9
|
||||
|
|
||||
LL | use issue_59764::foo::makro as baz;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::makro as baz;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:107:33
|
||||
|
|
||||
LL | use issue_59764::foo::{baz, makro as foobar};
|
||||
| ^^^^^^^^^^^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::{makro as foobar, foo::{baz}};
|
||||
| ^^^^^^^^^^^^^^^^^^^ --^^
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:120:17
|
||||
|
|
||||
LL | makro as foobar}
|
||||
| ^^^^^^^^^^^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | issue_59764::{makro as foobar,
|
||||
LL |
|
||||
LL | foobaz,
|
||||
LL |
|
||||
LL |
|
||||
LL | foo::{baz}
|
||||
|
|
||||
|
||||
error[E0432]: unresolved import `issue_59764::foo::makro`
|
||||
--> $DIR/issue-59764.rs:127:5
|
||||
|
|
||||
LL | use issue_59764::foo::makro;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ no `makro` in `foo`
|
||||
|
|
||||
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
|
||||
help: a macro with this name exists at the root of the crate
|
||||
|
|
||||
LL | use issue_59764::makro;
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: cannot determine resolution for the macro `makro`
|
||||
--> $DIR/issue-59764.rs:130:1
|
||||
|
|
||||
LL | makro!(bar);
|
||||
| ^^^^^
|
||||
|
|
||||
= note: import resolution is stuck, try simplifying macro imports
|
||||
|
||||
error[E0425]: cannot find function `bar` in this scope
|
||||
--> $DIR/issue-59764.rs:134:5
|
||||
|
|
||||
LL | bar();
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error: aborting due to 18 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0425, E0432.
|
||||
For more information about an error, try `rustc --explain E0425`.
|
||||
12
src/test/ui/issues/issue-60075.rs
Normal file
12
src/test/ui/issues/issue-60075.rs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
fn main() {}
|
||||
|
||||
trait T {
|
||||
fn qux() -> Option<usize> {
|
||||
let _ = if true {
|
||||
});
|
||||
//~^ ERROR expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `;`
|
||||
//~^^ ERROR expected one of `.`, `;`, `?`, `else`, or an operator, found `}`
|
||||
//~^^^ ERROR 6:11: 6:12: expected identifier, found `;`
|
||||
//~^^^^ ERROR missing `fn`, `type`, or `const` for trait-item declaration
|
||||
Some(4)
|
||||
}
|
||||
35
src/test/ui/issues/issue-60075.stderr
Normal file
35
src/test/ui/issues/issue-60075.stderr
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `}`
|
||||
--> $DIR/issue-60075.rs:6:10
|
||||
|
|
||||
LL | });
|
||||
| ^ expected one of `.`, `;`, `?`, `else`, or an operator here
|
||||
|
||||
error: expected one of `async`, `const`, `extern`, `fn`, `type`, `unsafe`, or `}`, found `;`
|
||||
--> $DIR/issue-60075.rs:6:11
|
||||
|
|
||||
LL | fn qux() -> Option<usize> {
|
||||
| - unclosed delimiter
|
||||
LL | let _ = if true {
|
||||
LL | });
|
||||
| ^ help: `}` may belong here
|
||||
|
||||
error: expected identifier, found `;`
|
||||
--> $DIR/issue-60075.rs:6:11
|
||||
|
|
||||
LL | });
|
||||
| ^ expected identifier
|
||||
|
||||
error: missing `fn`, `type`, or `const` for trait-item declaration
|
||||
--> $DIR/issue-60075.rs:6:12
|
||||
|
|
||||
LL | });
|
||||
| ____________^
|
||||
LL | |
|
||||
LL | |
|
||||
LL | |
|
||||
LL | |
|
||||
LL | | Some(4)
|
||||
| |________^ missing `fn`, `type`, or `const`
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
18
src/test/ui/issues/issue-60622.rs
Normal file
18
src/test/ui/issues/issue-60622.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// ignore-tidy-linelength
|
||||
|
||||
#![deny(warnings)]
|
||||
|
||||
struct Borked {}
|
||||
|
||||
impl Borked {
|
||||
fn a(&self) {}
|
||||
}
|
||||
|
||||
fn run_wild<T>(b: &Borked) {
|
||||
b.a::<'_, T>();
|
||||
//~^ ERROR cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
||||
//~^^ ERROR wrong number of type arguments: expected 0, found 1
|
||||
//~^^^ WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
27
src/test/ui/issues/issue-60622.stderr
Normal file
27
src/test/ui/issues/issue-60622.stderr
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
|
||||
--> $DIR/issue-60622.rs:12:11
|
||||
|
|
||||
LL | fn a(&self) {}
|
||||
| - the late bound lifetime parameter is introduced here
|
||||
...
|
||||
LL | b.a::<'_, T>();
|
||||
| ^^
|
||||
|
|
||||
note: lint level defined here
|
||||
--> $DIR/issue-60622.rs:3:9
|
||||
|
|
||||
LL | #![deny(warnings)]
|
||||
| ^^^^^^^^
|
||||
= note: #[deny(late_bound_lifetime_arguments)] implied by #[deny(warnings)]
|
||||
= 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 #42868 <https://github.com/rust-lang/rust/issues/42868>
|
||||
|
||||
error[E0107]: wrong number of type arguments: expected 0, found 1
|
||||
--> $DIR/issue-60622.rs:12:15
|
||||
|
|
||||
LL | b.a::<'_, T>();
|
||||
| ^ unexpected type argument
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0107`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue