mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
Remove #![allow(incomplete_features)] from delegation tests
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
fn foo() {}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
const C: u32 = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0324]: item `C` is an associated method, which doesn't match its trait `Trait`
|
||||
--> $DIR/bad-resolve.rs:24:5
|
||||
--> $DIR/bad-resolve.rs:23:5
|
||||
|
|
||||
LL | const C: u32 = 0;
|
||||
| ----------------- item in trait
|
||||
@@ -8,7 +8,7 @@ LL | reuse <F as Trait>::C;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ does not match trait
|
||||
|
||||
error[E0324]: item `Type` is an associated method, which doesn't match its trait `Trait`
|
||||
--> $DIR/bad-resolve.rs:27:5
|
||||
--> $DIR/bad-resolve.rs:26:5
|
||||
|
|
||||
LL | type Type;
|
||||
| ---------- item in trait
|
||||
@@ -17,7 +17,7 @@ LL | reuse <F as Trait>::Type;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ does not match trait
|
||||
|
||||
error[E0407]: method `baz` is not a member of trait `Trait`
|
||||
--> $DIR/bad-resolve.rs:30:5
|
||||
--> $DIR/bad-resolve.rs:29:5
|
||||
|
|
||||
LL | reuse <F as Trait>::baz;
|
||||
| ^^^^^^^^^^^^^^^^^^^^---^
|
||||
@@ -26,7 +26,7 @@ LL | reuse <F as Trait>::baz;
|
||||
| not a member of trait `Trait`
|
||||
|
||||
error[E0407]: method `foo2` is not a member of trait `Trait`
|
||||
--> $DIR/bad-resolve.rs:37:5
|
||||
--> $DIR/bad-resolve.rs:36:5
|
||||
|
|
||||
LL | reuse Trait::foo2 { self.0 }
|
||||
| ^^^^^^^^^^^^^----^^^^^^^^^^^
|
||||
@@ -35,19 +35,19 @@ LL | reuse Trait::foo2 { self.0 }
|
||||
| not a member of trait `Trait`
|
||||
|
||||
error[E0423]: expected function, found associated constant `Trait::C`
|
||||
--> $DIR/bad-resolve.rs:24:11
|
||||
--> $DIR/bad-resolve.rs:23:11
|
||||
|
|
||||
LL | reuse <F as Trait>::C;
|
||||
| ^^^^^^^^^^^^^^^ not a function
|
||||
|
||||
error[E0575]: expected method or associated constant, found associated type `Trait::Type`
|
||||
--> $DIR/bad-resolve.rs:27:11
|
||||
--> $DIR/bad-resolve.rs:26:11
|
||||
|
|
||||
LL | reuse <F as Trait>::Type;
|
||||
| ^^^^^^^^^^^^^^^^^^ not a method or associated constant
|
||||
|
||||
error[E0576]: cannot find method or associated constant `baz` in trait `Trait`
|
||||
--> $DIR/bad-resolve.rs:30:25
|
||||
--> $DIR/bad-resolve.rs:29:25
|
||||
|
|
||||
LL | fn bar() {}
|
||||
| -------- similarly named associated function `bar` defined here
|
||||
@@ -62,13 +62,13 @@ LL + reuse <F as Trait>::bar;
|
||||
|
|
||||
|
||||
error[E0425]: cannot find function `foo` in this scope
|
||||
--> $DIR/bad-resolve.rs:35:11
|
||||
--> $DIR/bad-resolve.rs:34:11
|
||||
|
|
||||
LL | reuse foo { &self.0 }
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find function `foo2` in trait `Trait`
|
||||
--> $DIR/bad-resolve.rs:37:18
|
||||
--> $DIR/bad-resolve.rs:36:18
|
||||
|
|
||||
LL | fn foo(&self, x: i32) -> i32 { x }
|
||||
| ---------------------------- similarly named associated function `foo` defined here
|
||||
@@ -83,7 +83,7 @@ LL + reuse Trait::foo { self.0 }
|
||||
|
|
||||
|
||||
error[E0046]: not all trait items implemented, missing: `Type`
|
||||
--> $DIR/bad-resolve.rs:22:1
|
||||
--> $DIR/bad-resolve.rs:21:1
|
||||
|
|
||||
LL | type Type;
|
||||
| --------- `Type` from trait
|
||||
@@ -92,7 +92,7 @@ LL | impl Trait for S {
|
||||
| ^^^^^^^^^^^^^^^^ missing `Type` in implementation
|
||||
|
||||
error[E0433]: cannot find module or crate `unresolved_prefix` in this scope
|
||||
--> $DIR/bad-resolve.rs:43:7
|
||||
--> $DIR/bad-resolve.rs:42:7
|
||||
|
|
||||
LL | reuse unresolved_prefix::{a, b, c};
|
||||
| ^^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `unresolved_prefix`
|
||||
@@ -100,7 +100,7 @@ LL | reuse unresolved_prefix::{a, b, c};
|
||||
= help: you might be missing a crate named `unresolved_prefix`
|
||||
|
||||
error[E0433]: `crate` in paths can only be used in start position
|
||||
--> $DIR/bad-resolve.rs:44:29
|
||||
--> $DIR/bad-resolve.rs:43:29
|
||||
|
|
||||
LL | reuse prefix::{self, super, crate};
|
||||
| ^^^^^ can only be used in path start position
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ check-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
fn foo(&self) {}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ check-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
fn foo(&self) {}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0261]: use of undeclared lifetime name `'a`
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:68
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:68
|
||||
|
|
||||
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
|
||||
| ^^ undeclared lifetime
|
||||
@@ -14,7 +14,7 @@ LL | impl<'a> Trait for Z {
|
||||
| ++++
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'a`
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:68
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:68
|
||||
|
|
||||
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
|
||||
| ^^ undeclared lifetime
|
||||
@@ -29,7 +29,7 @@ LL | impl<'a> Trait for Z {
|
||||
| ++++
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'a`
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:68
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:68
|
||||
|
|
||||
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
|
||||
| ^^ undeclared lifetime
|
||||
@@ -44,7 +44,7 @@ LL | impl<'a> Trait for Z {
|
||||
| ++++
|
||||
|
||||
error[E0599]: no associated function or constant named `new` found for struct `InvariantRef<'a, T>` in the current scope
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:9:41
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:8:41
|
||||
|
|
||||
LL | pub struct InvariantRef<'a, T: ?Sized>(&'a T, PhantomData<&'a mut &'a T>);
|
||||
| -------------------------------------- associated function or constant `new` not found for this struct
|
||||
@@ -53,19 +53,19 @@ LL | pub const NEW: Self = InvariantRef::new(&());
|
||||
| ^^^ associated function or constant not found in `InvariantRef<'_, _>`
|
||||
|
||||
error[E0277]: the trait bound `u8: Trait` is not satisfied
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:12
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:12
|
||||
|
|
||||
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
|
||||
| ^^ the trait `Trait` is not implemented for `u8`
|
||||
|
|
||||
help: the trait `Trait` is implemented for `Z`
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:1
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:20:1
|
||||
|
|
||||
LL | impl Trait for Z {
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:53
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:53
|
||||
|
|
||||
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `InvariantRef<'_, ()>`
|
||||
@@ -74,20 +74,20 @@ LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW
|
||||
found struct `InvariantRef<'_, ()>`
|
||||
|
||||
error[E0277]: the trait bound `u8: Trait` is not satisfied
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:12
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:12
|
||||
|
|
||||
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
|
||||
| ^^ the trait `Trait` is not implemented for `u8`
|
||||
|
|
||||
help: the trait `Trait` is implemented for `Z`
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:1
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:20:1
|
||||
|
|
||||
LL | impl Trait for Z {
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:53
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:53
|
||||
|
|
||||
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `InvariantRef<'_, ()>`
|
||||
@@ -97,20 +97,20 @@ LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error[E0277]: the trait bound `u8: Trait` is not satisfied
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:12
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:12
|
||||
|
|
||||
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
|
||||
| ^^ the trait `Trait` is not implemented for `u8`
|
||||
|
|
||||
help: the trait `Trait` is implemented for `Z`
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:1
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:20:1
|
||||
|
|
||||
LL | impl Trait for Z {
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:22:53
|
||||
--> $DIR/correct_body_owner_parent_found_in_diagnostics.rs:21:53
|
||||
|
|
||||
LL | reuse <u8 as Trait>::{foo, bar, meh} { &const { InvariantRef::<'a>::NEW } }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ expected `u8`, found `InvariantRef<'_, ()>`
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
fn foo(&self) -> u32 { 0 }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0201]: duplicate definitions with name `foo`:
|
||||
--> $DIR/duplicate-definition-inside-trait-impl.rs:19:5
|
||||
--> $DIR/duplicate-definition-inside-trait-impl.rs:18:5
|
||||
|
|
||||
LL | fn foo(&self) -> u32 { 0 }
|
||||
| -------------------------- item in trait
|
||||
@@ -10,13 +10,13 @@ LL | reuse Trait::foo;
|
||||
| ^^^^^^^^^^^^^^^^^ duplicate definition
|
||||
|
||||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> $DIR/duplicate-definition-inside-trait-impl.rs:19:18
|
||||
--> $DIR/duplicate-definition-inside-trait-impl.rs:18:18
|
||||
|
|
||||
LL | reuse Trait::foo;
|
||||
| ^^^ argument #1 of type `&_` is missing
|
||||
|
|
||||
note: method defined here
|
||||
--> $DIR/duplicate-definition-inside-trait-impl.rs:5:8
|
||||
--> $DIR/duplicate-definition-inside-trait-impl.rs:4:8
|
||||
|
|
||||
LL | fn foo(&self) -> u32 { 0 }
|
||||
| ^^^ -----
|
||||
@@ -26,7 +26,7 @@ LL | reuse Trait::foo(/* value */);
|
||||
| +++++++++++++
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/duplicate-definition-inside-trait-impl.rs:19:18
|
||||
--> $DIR/duplicate-definition-inside-trait-impl.rs:18:18
|
||||
|
|
||||
LL | reuse Trait::foo;
|
||||
| ^^^- help: consider using a semicolon here: `;`
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: empty glob delegation is not supported
|
||||
--> $DIR/empty-glob.rs:8:5
|
||||
--> $DIR/empty-glob.rs:7:5
|
||||
|
|
||||
LL | reuse Trait::*;
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod m {}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: empty list delegation is not supported
|
||||
--> $DIR/empty-list.rs:6:1
|
||||
--> $DIR/empty-list.rs:5:1
|
||||
|
|
||||
LL | reuse m::{};
|
||||
| ^^^^^^^^^^^^
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait ToReuse {
|
||||
fn foo(&self, x: i32) -> i32 { x }
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
fn bar(&self, x: i32) -> i32 { x }
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod to_reuse {
|
||||
use crate::S;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//@ edition:2015
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
fn foo1(&self, x: i32) -> i32 { x }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0407]: method `foo3` is not a member of trait `Trait`
|
||||
--> $DIR/explicit-paths.rs:50:9
|
||||
--> $DIR/explicit-paths.rs:49:9
|
||||
|
|
||||
LL | reuse to_reuse::foo3;
|
||||
| ^^^^^^^^^^^^^^^^----^
|
||||
@@ -8,7 +8,7 @@ LL | reuse to_reuse::foo3;
|
||||
| not a member of trait `Trait`
|
||||
|
||||
error[E0407]: method `foo4` is not a member of trait `Trait`
|
||||
--> $DIR/explicit-paths.rs:52:9
|
||||
--> $DIR/explicit-paths.rs:51:9
|
||||
|
|
||||
LL | reuse F::foo4 { &self.0 }
|
||||
| ^^^^^^^^^----^^^^^^^^^^^^
|
||||
@@ -17,49 +17,49 @@ LL | reuse F::foo4 { &self.0 }
|
||||
| not a member of trait `Trait`
|
||||
|
||||
error[E0425]: cannot find function `foo4` in `S`
|
||||
--> $DIR/explicit-paths.rs:28:14
|
||||
--> $DIR/explicit-paths.rs:27:14
|
||||
|
|
||||
LL | reuse S::foo4;
|
||||
| ^^^^ not found in `S`
|
||||
|
||||
error[E0425]: cannot find function `foo4` in `F`
|
||||
--> $DIR/explicit-paths.rs:39:18
|
||||
--> $DIR/explicit-paths.rs:38:18
|
||||
|
|
||||
LL | reuse F::foo4 { &self.0 }
|
||||
| ^^^^ not found in `F`
|
||||
|
|
||||
note: function `fn_to_other::foo4` exists but is inaccessible
|
||||
--> $DIR/explicit-paths.rs:28:5
|
||||
--> $DIR/explicit-paths.rs:27:5
|
||||
|
|
||||
LL | reuse S::foo4;
|
||||
| ^^^^^^^^^^^^^^ not accessible
|
||||
|
||||
error[E0425]: cannot find function `foo4` in `F`
|
||||
--> $DIR/explicit-paths.rs:52:18
|
||||
--> $DIR/explicit-paths.rs:51:18
|
||||
|
|
||||
LL | reuse F::foo4 { &self.0 }
|
||||
| ^^^^ not found in `F`
|
||||
|
|
||||
note: function `fn_to_other::foo4` exists but is inaccessible
|
||||
--> $DIR/explicit-paths.rs:28:5
|
||||
--> $DIR/explicit-paths.rs:27:5
|
||||
|
|
||||
LL | reuse S::foo4;
|
||||
| ^^^^^^^^^^^^^^ not accessible
|
||||
|
||||
error[E0425]: cannot find function `foo4` in `F`
|
||||
--> $DIR/explicit-paths.rs:66:18
|
||||
--> $DIR/explicit-paths.rs:65:18
|
||||
|
|
||||
LL | reuse F::foo4 { &F }
|
||||
| ^^^^ not found in `F`
|
||||
|
|
||||
note: function `fn_to_other::foo4` exists but is inaccessible
|
||||
--> $DIR/explicit-paths.rs:28:5
|
||||
--> $DIR/explicit-paths.rs:27:5
|
||||
|
|
||||
LL | reuse S::foo4;
|
||||
| ^^^^^^^^^^^^^^ not accessible
|
||||
|
||||
error[E0119]: conflicting implementations of trait `Trait` for type `S`
|
||||
--> $DIR/explicit-paths.rs:75:5
|
||||
--> $DIR/explicit-paths.rs:74:5
|
||||
|
|
||||
LL | impl Trait for S {
|
||||
| ---------------- first implementation here
|
||||
@@ -68,7 +68,7 @@ LL | impl Trait for S {
|
||||
| ^^^^^^^^^^^^^^^^ conflicting implementation for `S`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/explicit-paths.rs:62:36
|
||||
--> $DIR/explicit-paths.rs:61:36
|
||||
|
|
||||
LL | trait Trait2 : Trait {
|
||||
| -------------------- found this type parameter
|
||||
@@ -80,24 +80,24 @@ LL | reuse <F as Trait>::foo1 { self }
|
||||
= note: expected reference `&F`
|
||||
found reference `&Self`
|
||||
note: method defined here
|
||||
--> $DIR/explicit-paths.rs:6:8
|
||||
--> $DIR/explicit-paths.rs:5:8
|
||||
|
|
||||
LL | fn foo1(&self, x: i32) -> i32 { x }
|
||||
| ^^^^ -----
|
||||
|
||||
error[E0277]: the trait bound `S2: Trait` is not satisfied
|
||||
--> $DIR/explicit-paths.rs:77:16
|
||||
--> $DIR/explicit-paths.rs:76:16
|
||||
|
|
||||
LL | reuse <S2 as Trait>::foo1;
|
||||
| ^^ unsatisfied trait bound
|
||||
|
|
||||
help: the trait `Trait` is not implemented for `S2`
|
||||
--> $DIR/explicit-paths.rs:74:5
|
||||
--> $DIR/explicit-paths.rs:73:5
|
||||
|
|
||||
LL | struct S2;
|
||||
| ^^^^^^^^^
|
||||
help: the following other types implement trait `Trait`
|
||||
--> $DIR/explicit-paths.rs:11:1
|
||||
--> $DIR/explicit-paths.rs:10:1
|
||||
|
|
||||
LL | impl Trait for F {}
|
||||
| ^^^^^^^^^^^^^^^^ `F`
|
||||
@@ -109,7 +109,7 @@ LL | impl Trait for S {
|
||||
| ^^^^^^^^^^^^^^^^ `S`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/explicit-paths.rs:77:30
|
||||
--> $DIR/explicit-paths.rs:76:30
|
||||
|
|
||||
LL | reuse <S2 as Trait>::foo1;
|
||||
| ^^^^
|
||||
@@ -120,7 +120,7 @@ LL | reuse <S2 as Trait>::foo1;
|
||||
= note: expected reference `&S2`
|
||||
found reference `&S`
|
||||
note: method defined here
|
||||
--> $DIR/explicit-paths.rs:6:8
|
||||
--> $DIR/explicit-paths.rs:5:8
|
||||
|
|
||||
LL | fn foo1(&self, x: i32) -> i32 { x }
|
||||
| ^^^^ -----
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
#![feature(c_variadic)]
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod to_reuse {
|
||||
pub unsafe extern "C" fn variadic_fn(n: usize, mut args: ...) {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: delegation to C-variadic functions is not allowed
|
||||
--> $DIR/fn-header-variadic.rs:12:17
|
||||
--> $DIR/fn-header-variadic.rs:11:17
|
||||
|
|
||||
LL | pub unsafe extern "C" fn variadic_fn(n: usize, mut args: ...) {}
|
||||
| ------------------------------------------------------------- callee defined here
|
||||
@@ -8,7 +8,7 @@ LL | reuse to_reuse::variadic_fn;
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error: delegation to C-variadic functions is not allowed
|
||||
--> $DIR/fn-header-variadic.rs:14:22
|
||||
--> $DIR/fn-header-variadic.rs:13:22
|
||||
|
|
||||
LL | reuse fn_header_aux::variadic_fn_extern;
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
#![feature(c_variadic)]
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
#![deny(unused_unsafe)]
|
||||
|
||||
mod to_reuse {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
#![deny(unsafe_op_in_unsafe_fn)]
|
||||
#![deny(unused_unsafe)]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/foreign-fn.rs:17:30
|
||||
--> $DIR/foreign-fn.rs:16:30
|
||||
|
|
||||
LL | let _: extern "C" fn() = default_unsafe_foo;
|
||||
| --------------- ^^^^^^^^^^^^^^^^^^ expected safe fn, found unsafe fn
|
||||
@@ -11,7 +11,7 @@ LL | let _: extern "C" fn() = default_unsafe_foo;
|
||||
= note: unsafe functions cannot be coerced into safe function pointers
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/foreign-fn.rs:19:30
|
||||
--> $DIR/foreign-fn.rs:18:30
|
||||
|
|
||||
LL | let _: extern "C" fn() = unsafe_foo;
|
||||
| --------------- ^^^^^^^^^^ expected safe fn, found unsafe fn
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
fn main() {
|
||||
fn foo<const N: dyn for<'a> Foo>() {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0405]: cannot find trait `Foo` in this scope
|
||||
--> $DIR/const-type-ice-153433.rs:5:33
|
||||
--> $DIR/const-type-ice-153433.rs:4:33
|
||||
|
|
||||
LL | fn foo<const N: dyn for<'a> Foo>() {}
|
||||
| ^^^ not found in this scope
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait<'a, T, const F: fn(&CStr) -> usize> {
|
||||
//~^ ERROR: cannot find type `CStr` in this scope
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0425]: cannot find type `CStr` in this scope
|
||||
--> $DIR/const-type-ice-153499.rs:4:33
|
||||
--> $DIR/const-type-ice-153499.rs:3:33
|
||||
|
|
||||
LL | trait Trait<'a, T, const F: fn(&CStr) -> usize> {
|
||||
| ^^^^ not found in this scope
|
||||
@@ -10,7 +10,7 @@ LL + use std::ffi::CStr;
|
||||
|
|
||||
|
||||
error: using function pointers as const generic parameters is forbidden
|
||||
--> $DIR/const-type-ice-153499.rs:4:29
|
||||
--> $DIR/const-type-ice-153499.rs:3:29
|
||||
|
|
||||
LL | trait Trait<'a, T, const F: fn(&CStr) -> usize> {
|
||||
| ^^^^^^^^^^^^^^^^^^
|
||||
@@ -18,7 +18,7 @@ LL | trait Trait<'a, T, const F: fn(&CStr) -> usize> {
|
||||
= note: the only supported types are integers, `bool`, and `char`
|
||||
|
||||
error: using function pointers as const generic parameters is forbidden
|
||||
--> $DIR/const-type-ice-153499.rs:10:14
|
||||
--> $DIR/const-type-ice-153499.rs:9:14
|
||||
|
|
||||
LL | reuse Trait::foo;
|
||||
| ^^^
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![feature(adt_const_params)]
|
||||
#![feature(unsized_const_params)]
|
||||
|
||||
trait Trait<'a, T, const N: str> {
|
||||
fn foo<'v, A, B>(&self) {}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
//@ compile-flags: -Z deduplicate-diagnostics=yes
|
||||
//@ edition:2024
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![feature(iter_advance_by)]
|
||||
#![feature(fn_delegation)]#![feature(iter_advance_by)]
|
||||
#![feature(iter_array_chunks)]
|
||||
#![feature(iterator_try_collect)]
|
||||
#![feature(iterator_try_reduce)]
|
||||
@@ -15,7 +14,7 @@
|
||||
#![feature(iter_partition_in_place)]
|
||||
#![feature(trusted_random_access)]
|
||||
#![feature(try_find)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
|
||||
impl Iterator {
|
||||
//~^ ERROR: expected a type, found a trait [E0782]
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error[E0575]: expected method or associated constant, found associated type `Iterator::Item`
|
||||
--> $DIR/def-path-hash-collision-ice-153410.rs:22:10
|
||||
--> $DIR/def-path-hash-collision-ice-153410.rs:21:10
|
||||
|
|
||||
LL | reuse< < <for<'a> fn()>::Output>::Item as Iterator>::*;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a method or associated constant
|
||||
|
||||
error[E0782]: expected a type, found a trait
|
||||
--> $DIR/def-path-hash-collision-ice-153410.rs:20:6
|
||||
--> $DIR/def-path-hash-collision-ice-153410.rs:19:6
|
||||
|
|
||||
LL | impl Iterator {
|
||||
| ^^^^^^^^
|
||||
@@ -20,7 +20,7 @@ LL | impl Iterator for /* Type */ {
|
||||
| ++++++++++++++
|
||||
|
||||
error[E0223]: ambiguous associated type
|
||||
--> $DIR/def-path-hash-collision-ice-153410.rs:22:14
|
||||
--> $DIR/def-path-hash-collision-ice-153410.rs:21:14
|
||||
|
|
||||
LL | reuse< < <for<'a> fn()>::Output>::Item as Iterator>::*;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod to_reuse {
|
||||
pub fn types<T, U>(x: U, y: T) -> (T, U) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod to_reuse {
|
||||
pub fn consts<const N: i32>() -> i32 {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0107]: function takes 0 lifetime arguments but 1 lifetime argument was supplied
|
||||
--> $DIR/free-fn-to-free-fn.rs:19:5
|
||||
--> $DIR/free-fn-to-free-fn.rs:18:5
|
||||
|
|
||||
LL | late::<'static>(&0u8);
|
||||
| ^^^^----------- help: remove the unnecessary generics
|
||||
@@ -7,13 +7,13 @@ LL | late::<'static>(&0u8);
|
||||
| expected 0 lifetime arguments
|
||||
|
|
||||
note: function defined here, with 0 lifetime parameters
|
||||
--> $DIR/free-fn-to-free-fn.rs:15:17
|
||||
--> $DIR/free-fn-to-free-fn.rs:14:17
|
||||
|
|
||||
LL | reuse to_reuse::late;
|
||||
| ^^^^
|
||||
|
||||
error[E0277]: the trait bound `S: Clone` is not satisfied
|
||||
--> $DIR/free-fn-to-free-fn.rs:23:12
|
||||
--> $DIR/free-fn-to-free-fn.rs:22:12
|
||||
|
|
||||
LL | bounds(S);
|
||||
| ------ ^ the trait `Clone` is not implemented for `S`
|
||||
@@ -21,7 +21,7 @@ LL | bounds(S);
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `bounds`
|
||||
--> $DIR/free-fn-to-free-fn.rs:11:22
|
||||
--> $DIR/free-fn-to-free-fn.rs:10:22
|
||||
|
|
||||
LL | pub fn bounds<T: Clone>(_: T) {}
|
||||
| ^^^^^ required by this bound in `bounds`
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ compile-flags: -Z deduplicate-diagnostics=yes
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait<T> {
|
||||
fn foo<U>(&self, _: U, _: T) {}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
|
||||
--> $DIR/free-fn-to-trait-infer.rs:12:15
|
||||
--> $DIR/free-fn-to-trait-infer.rs:11:15
|
||||
|
|
||||
LL | reuse Trait::<_>::foo::<i32> as generic_arguments1;
|
||||
| ^ not allowed in type signatures
|
||||
|
||||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
|
||||
--> $DIR/free-fn-to-trait-infer.rs:14:20
|
||||
--> $DIR/free-fn-to-trait-infer.rs:13:20
|
||||
|
|
||||
LL | reuse <u8 as Trait<_>>::foo as generic_arguments2;
|
||||
| ^ not allowed in type signatures
|
||||
|
||||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
|
||||
--> $DIR/free-fn-to-trait-infer.rs:16:8
|
||||
--> $DIR/free-fn-to-trait-infer.rs:15:8
|
||||
|
|
||||
LL | reuse <_ as Trait<_>>::foo as generic_arguments3;
|
||||
| ^ not allowed in type signatures
|
||||
|
||||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
|
||||
--> $DIR/free-fn-to-trait-infer.rs:16:19
|
||||
--> $DIR/free-fn-to-trait-infer.rs:15:19
|
||||
|
|
||||
LL | reuse <_ as Trait<_>>::foo as generic_arguments3;
|
||||
| ^ not allowed in type signatures
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod types {
|
||||
pub trait Trait<T> {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod default_param {
|
||||
pub trait Trait<T = u32> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0277]: the trait bound `S: Copy` is not satisfied
|
||||
--> $DIR/free-fn-to-trait-method.rs:39:18
|
||||
--> $DIR/free-fn-to-trait-method.rs:38:18
|
||||
|
|
||||
LL | bounds(&0u8, S, U);
|
||||
| ------ ^ the trait `Copy` is not implemented for `S`
|
||||
@@ -7,7 +7,7 @@ LL | bounds(&0u8, S, U);
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `bounds`
|
||||
--> $DIR/free-fn-to-trait-method.rs:23:54
|
||||
--> $DIR/free-fn-to-trait-method.rs:22:54
|
||||
|
|
||||
LL | fn foo<U: Clone>(&self, t: T, u: U) where T: Copy {}
|
||||
| ^^^^ required by this bound in `bounds`
|
||||
@@ -21,7 +21,7 @@ LL | struct S;
|
||||
|
|
||||
|
||||
error[E0277]: the trait bound `U: Clone` is not satisfied
|
||||
--> $DIR/free-fn-to-trait-method.rs:39:21
|
||||
--> $DIR/free-fn-to-trait-method.rs:38:21
|
||||
|
|
||||
LL | bounds(&0u8, S, U);
|
||||
| ------ ^ the trait `Clone` is not implemented for `U`
|
||||
@@ -29,7 +29,7 @@ LL | bounds(&0u8, S, U);
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
note: required by a bound in `bounds`
|
||||
--> $DIR/free-fn-to-trait-method.rs:23:19
|
||||
--> $DIR/free-fn-to-trait-method.rs:22:19
|
||||
|
|
||||
LL | fn foo<U: Clone>(&self, t: T, u: U) where T: Copy {}
|
||||
| ^^^^^ required by this bound in `bounds`
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Bound<T> {}
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
error[E0277]: the trait bound `Struct: Bound<T>` is not satisfied
|
||||
--> $DIR/free-to-trait-self-reuse.rs:32:49
|
||||
--> $DIR/free-to-trait-self-reuse.rs:31:49
|
||||
|
|
||||
LL | impl<'a, T, const X: usize> Trait<'a, T, X> for Struct {}
|
||||
| ^^^^^^ unsatisfied trait bound
|
||||
|
|
||||
help: the trait `Bound<T>` is not implemented for `Struct`
|
||||
--> $DIR/free-to-trait-self-reuse.rs:31:1
|
||||
--> $DIR/free-to-trait-self-reuse.rs:30:1
|
||||
|
|
||||
LL | struct Struct;
|
||||
| ^^^^^^^^^^^^^
|
||||
help: the trait `Bound<T>` is implemented for `usize`
|
||||
--> $DIR/free-to-trait-self-reuse.rs:16:1
|
||||
--> $DIR/free-to-trait-self-reuse.rs:15:1
|
||||
|
|
||||
LL | impl<T> Bound<T> for usize {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `Trait`
|
||||
--> $DIR/free-to-trait-self-reuse.rs:8:11
|
||||
--> $DIR/free-to-trait-self-reuse.rs:7:11
|
||||
|
|
||||
LL | trait Trait<'a, T, const X: usize>
|
||||
| ----- required by a bound in this trait
|
||||
@@ -24,13 +24,13 @@ LL | Self: Bound<T> + Sized,
|
||||
| ^^^^^^^^ required by this bound in `Trait`
|
||||
|
||||
error[E0277]: the trait bound `String: Trait<'a, T, X>` is not satisfied
|
||||
--> $DIR/free-to-trait-self-reuse.rs:28:8
|
||||
--> $DIR/free-to-trait-self-reuse.rs:27:8
|
||||
|
|
||||
LL | reuse <String as Trait>::method as error5;
|
||||
| ^^^^^^ the trait `Trait<'a, T, X>` is not implemented for `String`
|
||||
|
|
||||
help: the following other types implement trait `Trait<'a, T, X>`
|
||||
--> $DIR/free-to-trait-self-reuse.rs:15:1
|
||||
--> $DIR/free-to-trait-self-reuse.rs:14:1
|
||||
|
|
||||
LL | impl<'a, T, const X: usize> Trait<'a, T, X> for usize {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `usize`
|
||||
@@ -39,23 +39,23 @@ LL | impl<'a, T, const X: usize> Trait<'a, T, X> for Struct {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Struct`
|
||||
|
||||
error[E0277]: the trait bound `Struct: Bound<T>` is not satisfied
|
||||
--> $DIR/free-to-trait-self-reuse.rs:35:8
|
||||
--> $DIR/free-to-trait-self-reuse.rs:34:8
|
||||
|
|
||||
LL | reuse <Struct as Trait>::method as error6;
|
||||
| ^^^^^^ unsatisfied trait bound
|
||||
|
|
||||
help: the trait `Bound<T>` is not implemented for `Struct`
|
||||
--> $DIR/free-to-trait-self-reuse.rs:31:1
|
||||
--> $DIR/free-to-trait-self-reuse.rs:30:1
|
||||
|
|
||||
LL | struct Struct;
|
||||
| ^^^^^^^^^^^^^
|
||||
help: the trait `Bound<T>` is implemented for `usize`
|
||||
--> $DIR/free-to-trait-self-reuse.rs:16:1
|
||||
--> $DIR/free-to-trait-self-reuse.rs:15:1
|
||||
|
|
||||
LL | impl<T> Bound<T> for usize {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `Trait::method`
|
||||
--> $DIR/free-to-trait-self-reuse.rs:8:11
|
||||
--> $DIR/free-to-trait-self-reuse.rs:7:11
|
||||
|
|
||||
LL | Self: Bound<T> + Sized,
|
||||
| ^^^^^^^^ required by this bound in `Trait::method`
|
||||
@@ -64,7 +64,7 @@ LL | fn method<U, const B: bool>(&self, x: U) {}
|
||||
| ------ required by a bound in this associated function
|
||||
|
||||
error[E0107]: function takes 3 generic arguments but 2 generic arguments were supplied
|
||||
--> $DIR/free-to-trait-self-reuse.rs:44:5
|
||||
--> $DIR/free-to-trait-self-reuse.rs:43:5
|
||||
|
|
||||
LL | foo3::<String, true>(&123, "".to_string());
|
||||
| ^^^^ ------ ---- supplied 2 generic arguments
|
||||
@@ -72,7 +72,7 @@ LL | foo3::<String, true>(&123, "".to_string());
|
||||
| expected 3 generic arguments
|
||||
|
|
||||
note: function defined here, with 3 generic parameters: `Self`, `U`, `B`
|
||||
--> $DIR/free-to-trait-self-reuse.rs:23:45
|
||||
--> $DIR/free-to-trait-self-reuse.rs:22:45
|
||||
|
|
||||
LL | reuse Trait::<'static, i32, 123>::method as foo3;
|
||||
| ------ ^^^^
|
||||
@@ -82,7 +82,7 @@ LL | foo3::<String, true, B>(&123, "".to_string());
|
||||
| +++
|
||||
|
||||
error[E0107]: function takes 5 generic arguments but 4 generic arguments were supplied
|
||||
--> $DIR/free-to-trait-self-reuse.rs:47:5
|
||||
--> $DIR/free-to-trait-self-reuse.rs:46:5
|
||||
|
|
||||
LL | bar3::<'static, i32, 123, bool, false>(&mut 123, true);
|
||||
| ^^^^ --- --- ---- ----- supplied 4 generic arguments
|
||||
@@ -90,7 +90,7 @@ LL | bar3::<'static, i32, 123, bool, false>(&mut 123, true);
|
||||
| expected 5 generic arguments
|
||||
|
|
||||
note: function defined here, with 5 generic parameters: `Self`, `T`, `X`, `U`, `B`
|
||||
--> $DIR/free-to-trait-self-reuse.rs:25:25
|
||||
--> $DIR/free-to-trait-self-reuse.rs:24:25
|
||||
|
|
||||
LL | reuse Trait::method3 as bar3;
|
||||
| ------- ^^^^
|
||||
@@ -100,7 +100,7 @@ LL | bar3::<'static, i32, 123, bool, false, B>(&mut 123, true);
|
||||
| +++
|
||||
|
||||
error[E0107]: function takes 3 generic arguments but 2 generic arguments were supplied
|
||||
--> $DIR/free-to-trait-self-reuse.rs:49:5
|
||||
--> $DIR/free-to-trait-self-reuse.rs:48:5
|
||||
|
|
||||
LL | bar4::<'static, usize, 321>(&mut 123, vec![123]);
|
||||
| ^^^^ ----- --- supplied 2 generic arguments
|
||||
@@ -108,7 +108,7 @@ LL | bar4::<'static, usize, 321>(&mut 123, vec![123]);
|
||||
| expected 3 generic arguments
|
||||
|
|
||||
note: function defined here, with 3 generic parameters: `Self`, `T`, `X`
|
||||
--> $DIR/free-to-trait-self-reuse.rs:26:44
|
||||
--> $DIR/free-to-trait-self-reuse.rs:25:44
|
||||
|
|
||||
LL | reuse Trait::method3::<Vec<i32>, false> as bar4;
|
||||
| ------- ^^^^
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Bound<T> {}
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
error[E0277]: the trait bound `Struct: Bound<T>` is not satisfied
|
||||
--> $DIR/free-to-trait-static-reuse.rs:34:49
|
||||
--> $DIR/free-to-trait-static-reuse.rs:33:49
|
||||
|
|
||||
LL | impl<'a, T, const X: usize> Trait<'a, T, X> for Struct {}
|
||||
| ^^^^^^ unsatisfied trait bound
|
||||
|
|
||||
help: the trait `Bound<T>` is not implemented for `Struct`
|
||||
--> $DIR/free-to-trait-static-reuse.rs:33:1
|
||||
--> $DIR/free-to-trait-static-reuse.rs:32:1
|
||||
|
|
||||
LL | struct Struct;
|
||||
| ^^^^^^^^^^^^^
|
||||
help: the trait `Bound<T>` is implemented for `usize`
|
||||
--> $DIR/free-to-trait-static-reuse.rs:14:1
|
||||
--> $DIR/free-to-trait-static-reuse.rs:13:1
|
||||
|
|
||||
LL | impl<T> Bound<T> for usize {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `Trait`
|
||||
--> $DIR/free-to-trait-static-reuse.rs:8:11
|
||||
--> $DIR/free-to-trait-static-reuse.rs:7:11
|
||||
|
|
||||
LL | trait Trait<'a, T, const X: usize>
|
||||
| ----- required by a bound in this trait
|
||||
@@ -24,13 +24,13 @@ LL | Self: Bound<T>,
|
||||
| ^^^^^^^^ required by this bound in `Trait`
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/free-to-trait-static-reuse.rs:21:14
|
||||
--> $DIR/free-to-trait-static-reuse.rs:20:14
|
||||
|
|
||||
LL | reuse Trait::static_method as error { self - 123 }
|
||||
| ^^^^^^^^^^^^^ cannot infer type
|
||||
|
|
||||
note: multiple `impl`s satisfying `_: Trait<'a, T, X>` found
|
||||
--> $DIR/free-to-trait-static-reuse.rs:13:1
|
||||
--> $DIR/free-to-trait-static-reuse.rs:12:1
|
||||
|
|
||||
LL | impl<'a, T, const X: usize> Trait<'a, T, X> for usize {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -39,13 +39,13 @@ LL | impl<'a, T, const X: usize> Trait<'a, T, X> for Struct {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/free-to-trait-static-reuse.rs:23:35
|
||||
--> $DIR/free-to-trait-static-reuse.rs:22:35
|
||||
|
|
||||
LL | reuse Trait::<'static, i32, 123>::static_method as error2;
|
||||
| ^^^^^^^^^^^^^ cannot infer type
|
||||
|
|
||||
note: multiple `impl`s satisfying `_: Trait<'static, i32, 123>` found
|
||||
--> $DIR/free-to-trait-static-reuse.rs:13:1
|
||||
--> $DIR/free-to-trait-static-reuse.rs:12:1
|
||||
|
|
||||
LL | impl<'a, T, const X: usize> Trait<'a, T, X> for usize {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -54,13 +54,13 @@ LL | impl<'a, T, const X: usize> Trait<'a, T, X> for Struct {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/free-to-trait-static-reuse.rs:25:35
|
||||
--> $DIR/free-to-trait-static-reuse.rs:24:35
|
||||
|
|
||||
LL | reuse Trait::<'static, i32, 123>::static_method::<'static, String, false> as error3;
|
||||
| ^^^^^^^^^^^^^ cannot infer type
|
||||
|
|
||||
note: multiple `impl`s satisfying `_: Trait<'static, i32, 123>` found
|
||||
--> $DIR/free-to-trait-static-reuse.rs:13:1
|
||||
--> $DIR/free-to-trait-static-reuse.rs:12:1
|
||||
|
|
||||
LL | impl<'a, T, const X: usize> Trait<'a, T, X> for usize {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -69,13 +69,13 @@ LL | impl<'a, T, const X: usize> Trait<'a, T, X> for Struct {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0283]: type annotations needed
|
||||
--> $DIR/free-to-trait-static-reuse.rs:27:14
|
||||
--> $DIR/free-to-trait-static-reuse.rs:26:14
|
||||
|
|
||||
LL | reuse Trait::static_method::<'static, Vec<i32>, false> as error4 { self + 4 }
|
||||
| ^^^^^^^^^^^^^ cannot infer type
|
||||
|
|
||||
note: multiple `impl`s satisfying `_: Trait<'a, T, X>` found
|
||||
--> $DIR/free-to-trait-static-reuse.rs:13:1
|
||||
--> $DIR/free-to-trait-static-reuse.rs:12:1
|
||||
|
|
||||
LL | impl<'a, T, const X: usize> Trait<'a, T, X> for usize {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -84,13 +84,13 @@ LL | impl<'a, T, const X: usize> Trait<'a, T, X> for Struct {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error[E0277]: the trait bound `String: Trait<'a, T, X>` is not satisfied
|
||||
--> $DIR/free-to-trait-static-reuse.rs:30:8
|
||||
--> $DIR/free-to-trait-static-reuse.rs:29:8
|
||||
|
|
||||
LL | reuse <String as Trait>::static_method as error5;
|
||||
| ^^^^^^ the trait `Trait<'a, T, X>` is not implemented for `String`
|
||||
|
|
||||
help: the following other types implement trait `Trait<'a, T, X>`
|
||||
--> $DIR/free-to-trait-static-reuse.rs:13:1
|
||||
--> $DIR/free-to-trait-static-reuse.rs:12:1
|
||||
|
|
||||
LL | impl<'a, T, const X: usize> Trait<'a, T, X> for usize {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `usize`
|
||||
@@ -99,23 +99,23 @@ LL | impl<'a, T, const X: usize> Trait<'a, T, X> for Struct {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Struct`
|
||||
|
||||
error[E0277]: the trait bound `Struct: Bound<T>` is not satisfied
|
||||
--> $DIR/free-to-trait-static-reuse.rs:37:8
|
||||
--> $DIR/free-to-trait-static-reuse.rs:36:8
|
||||
|
|
||||
LL | reuse <Struct as Trait>::static_method as error6;
|
||||
| ^^^^^^ unsatisfied trait bound
|
||||
|
|
||||
help: the trait `Bound<T>` is not implemented for `Struct`
|
||||
--> $DIR/free-to-trait-static-reuse.rs:33:1
|
||||
--> $DIR/free-to-trait-static-reuse.rs:32:1
|
||||
|
|
||||
LL | struct Struct;
|
||||
| ^^^^^^^^^^^^^
|
||||
help: the trait `Bound<T>` is implemented for `usize`
|
||||
--> $DIR/free-to-trait-static-reuse.rs:14:1
|
||||
--> $DIR/free-to-trait-static-reuse.rs:13:1
|
||||
|
|
||||
LL | impl<T> Bound<T> for usize {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: required by a bound in `Trait::static_method`
|
||||
--> $DIR/free-to-trait-static-reuse.rs:8:11
|
||||
--> $DIR/free-to-trait-static-reuse.rs:7:11
|
||||
|
|
||||
LL | Self: Bound<T>,
|
||||
| ^^^^^^^^ required by this bound in `Trait::static_method`
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait<'a, 'b, 'c, A = usize, B = u32, C = String, const N: usize = 123> {
|
||||
fn foo<T = usize>(&self) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: defaults for generic parameters are not allowed here
|
||||
--> $DIR/generic-params-defaults.rs:5:12
|
||||
--> $DIR/generic-params-defaults.rs:4:12
|
||||
|
|
||||
LL | fn foo<T = usize>(&self) {
|
||||
| ^^^^^^^^^
|
||||
@@ -12,7 +12,7 @@ error: aborting due to 1 previous error
|
||||
|
||||
Future incompatibility report: Future breakage diagnostic:
|
||||
error: defaults for generic parameters are not allowed here
|
||||
--> $DIR/generic-params-defaults.rs:5:12
|
||||
--> $DIR/generic-params-defaults.rs:4:12
|
||||
|
|
||||
LL | fn foo<T = usize>(&self) {
|
||||
| ^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait<'a, 'b, 'c, A, B, C, const N: usize> {
|
||||
fn foo<'a, 'b, 'c, A, B, C, const N: usize>(&self) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0496]: lifetime name `'a` shadows a lifetime name that is already in scope
|
||||
--> $DIR/generic-params-same-names.rs:5:12
|
||||
--> $DIR/generic-params-same-names.rs:4:12
|
||||
|
|
||||
LL | trait Trait<'a, 'b, 'c, A, B, C, const N: usize> {
|
||||
| -- first declared here
|
||||
@@ -7,7 +7,7 @@ LL | fn foo<'a, 'b, 'c, A, B, C, const N: usize>(&self) {
|
||||
| ^^ lifetime `'a` already in scope
|
||||
|
||||
error[E0496]: lifetime name `'b` shadows a lifetime name that is already in scope
|
||||
--> $DIR/generic-params-same-names.rs:5:16
|
||||
--> $DIR/generic-params-same-names.rs:4:16
|
||||
|
|
||||
LL | trait Trait<'a, 'b, 'c, A, B, C, const N: usize> {
|
||||
| -- first declared here
|
||||
@@ -15,7 +15,7 @@ LL | fn foo<'a, 'b, 'c, A, B, C, const N: usize>(&self) {
|
||||
| ^^ lifetime `'b` already in scope
|
||||
|
||||
error[E0496]: lifetime name `'c` shadows a lifetime name that is already in scope
|
||||
--> $DIR/generic-params-same-names.rs:5:20
|
||||
--> $DIR/generic-params-same-names.rs:4:20
|
||||
|
|
||||
LL | trait Trait<'a, 'b, 'c, A, B, C, const N: usize> {
|
||||
| -- first declared here
|
||||
@@ -23,7 +23,7 @@ LL | fn foo<'a, 'b, 'c, A, B, C, const N: usize>(&self) {
|
||||
| ^^ lifetime `'c` already in scope
|
||||
|
||||
error[E0403]: the name `A` is already used for a generic parameter in this item's generic parameters
|
||||
--> $DIR/generic-params-same-names.rs:5:24
|
||||
--> $DIR/generic-params-same-names.rs:4:24
|
||||
|
|
||||
LL | trait Trait<'a, 'b, 'c, A, B, C, const N: usize> {
|
||||
| - first use of `A`
|
||||
@@ -31,7 +31,7 @@ LL | fn foo<'a, 'b, 'c, A, B, C, const N: usize>(&self) {
|
||||
| ^ already used
|
||||
|
||||
error[E0403]: the name `B` is already used for a generic parameter in this item's generic parameters
|
||||
--> $DIR/generic-params-same-names.rs:5:27
|
||||
--> $DIR/generic-params-same-names.rs:4:27
|
||||
|
|
||||
LL | trait Trait<'a, 'b, 'c, A, B, C, const N: usize> {
|
||||
| - first use of `B`
|
||||
@@ -39,7 +39,7 @@ LL | fn foo<'a, 'b, 'c, A, B, C, const N: usize>(&self) {
|
||||
| ^ already used
|
||||
|
||||
error[E0403]: the name `C` is already used for a generic parameter in this item's generic parameters
|
||||
--> $DIR/generic-params-same-names.rs:5:30
|
||||
--> $DIR/generic-params-same-names.rs:4:30
|
||||
|
|
||||
LL | trait Trait<'a, 'b, 'c, A, B, C, const N: usize> {
|
||||
| - first use of `C`
|
||||
@@ -47,7 +47,7 @@ LL | fn foo<'a, 'b, 'c, A, B, C, const N: usize>(&self) {
|
||||
| ^ already used
|
||||
|
||||
error[E0403]: the name `N` is already used for a generic parameter in this item's generic parameters
|
||||
--> $DIR/generic-params-same-names.rs:5:39
|
||||
--> $DIR/generic-params-same-names.rs:4:39
|
||||
|
|
||||
LL | trait Trait<'a, 'b, 'c, A, B, C, const N: usize> {
|
||||
| - first use of `N`
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
reuse generics::foo as bar;
|
||||
reuse generics::Trait::foo as trait_foo;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ compile-flags: -Z deduplicate-diagnostics=yes
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod test_1 {
|
||||
fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0401]: can't use generic parameters from outer item
|
||||
--> $DIR/generics-gen-args-errors.rs:34:21
|
||||
--> $DIR/generics-gen-args-errors.rs:33:21
|
||||
|
|
||||
LL | fn check<A, B, C>() {
|
||||
| - type parameter from outer item
|
||||
@@ -12,7 +12,7 @@ LL | reuse foo::<A, B, C> as xd;
|
||||
= note: nested items are independent from their parent item for everything except for privacy and name resolution
|
||||
|
||||
error[E0401]: can't use generic parameters from outer item
|
||||
--> $DIR/generics-gen-args-errors.rs:34:24
|
||||
--> $DIR/generics-gen-args-errors.rs:33:24
|
||||
|
|
||||
LL | fn check<A, B, C>() {
|
||||
| - type parameter from outer item
|
||||
@@ -25,7 +25,7 @@ LL | reuse foo::<A, B, C> as xd;
|
||||
= note: nested items are independent from their parent item for everything except for privacy and name resolution
|
||||
|
||||
error[E0401]: can't use generic parameters from outer item
|
||||
--> $DIR/generics-gen-args-errors.rs:34:27
|
||||
--> $DIR/generics-gen-args-errors.rs:33:27
|
||||
|
|
||||
LL | fn check<A, B, C>() {
|
||||
| - type parameter from outer item
|
||||
@@ -38,7 +38,7 @@ LL | reuse foo::<A, B, C> as xd;
|
||||
= note: nested items are independent from their parent item for everything except for privacy and name resolution
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'asdasd`
|
||||
--> $DIR/generics-gen-args-errors.rs:53:29
|
||||
--> $DIR/generics-gen-args-errors.rs:52:29
|
||||
|
|
||||
LL | reuse foo::<'static, _, 'asdasd, 'static, 'static, 'static, _> as bar3;
|
||||
| ^^^^^^^ undeclared lifetime
|
||||
@@ -49,7 +49,7 @@ LL | reuse foo'asdasd, ::<'static, _, 'asdasd, 'static, 'static, 'static, _>
|
||||
| ++++++++
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'a`
|
||||
--> $DIR/generics-gen-args-errors.rs:70:50
|
||||
--> $DIR/generics-gen-args-errors.rs:69:50
|
||||
|
|
||||
LL | reuse foo::<"asdasd", asd, "askdn", 'static, 'a> as bar7;
|
||||
| ^^ undeclared lifetime
|
||||
@@ -60,7 +60,7 @@ LL | reuse foo'a, ::<"asdasd", asd, "askdn", 'static, 'a> as bar7;
|
||||
| +++
|
||||
|
||||
error[E0106]: missing lifetime specifiers
|
||||
--> $DIR/generics-gen-args-errors.rs:117:19
|
||||
--> $DIR/generics-gen-args-errors.rs:116:19
|
||||
|
|
||||
LL | reuse Trait::<Trait, Clone, _, 'static, dyn Send, _>::foo::<1, 2, 3, _, 6> as bar7;
|
||||
| ^^^^^ expected 3 lifetime parameters
|
||||
@@ -71,7 +71,7 @@ LL | reuse Trait::<Trait<'a, 'a, 'a>, Clone, _, 'static, dyn Send, _>::foo'a
|
||||
| ++++++++++++ +++
|
||||
|
||||
error[E0423]: expected value, found struct `String`
|
||||
--> $DIR/generics-gen-args-errors.rs:14:33
|
||||
--> $DIR/generics-gen-args-errors.rs:13:33
|
||||
|
|
||||
LL | bar::<String, String, { String }>();
|
||||
| ^^^^^^
|
||||
@@ -81,7 +81,7 @@ LL | bar::<String, String, { String }>();
|
||||
= note: `String` defined here
|
||||
|
||||
error[E0425]: cannot find type `asd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:28:15
|
||||
--> $DIR/generics-gen-args-errors.rs:27:15
|
||||
|
|
||||
LL | bar::<asd, asd, asd>();
|
||||
| ^^^ not found in this scope
|
||||
@@ -92,7 +92,7 @@ LL | fn check<A, B, C, asd>() {
|
||||
| +++++
|
||||
|
||||
error[E0425]: cannot find type `asd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:28:20
|
||||
--> $DIR/generics-gen-args-errors.rs:27:20
|
||||
|
|
||||
LL | bar::<asd, asd, asd>();
|
||||
| ^^^ not found in this scope
|
||||
@@ -103,7 +103,7 @@ LL | fn check<A, B, C, asd>() {
|
||||
| +++++
|
||||
|
||||
error[E0425]: cannot find type `asd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:28:25
|
||||
--> $DIR/generics-gen-args-errors.rs:27:25
|
||||
|
|
||||
LL | bar::<asd, asd, asd>();
|
||||
| ^^^ not found in this scope
|
||||
@@ -114,73 +114,73 @@ LL | fn check<A, B, C, asd>() {
|
||||
| +++++
|
||||
|
||||
error[E0425]: cannot find type `asdasd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:57:39
|
||||
--> $DIR/generics-gen-args-errors.rs:56:39
|
||||
|
|
||||
LL | reuse foo::<String, 'static, 123, asdasd> as bar4;
|
||||
| ^^^^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find type `asd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:65:22
|
||||
--> $DIR/generics-gen-args-errors.rs:64:22
|
||||
|
|
||||
LL | reuse foo::<1, 2,asd,String, { let x = 0; }> as bar6;
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find type `asd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:70:27
|
||||
--> $DIR/generics-gen-args-errors.rs:69:27
|
||||
|
|
||||
LL | reuse foo::<"asdasd", asd, "askdn", 'static, 'a> as bar7;
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find type `asd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:85:19
|
||||
--> $DIR/generics-gen-args-errors.rs:84:19
|
||||
|
|
||||
LL | reuse Trait::<asd, asd, asd, asd, asd, asdasa>::foo as bar1;
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find type `asd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:85:24
|
||||
--> $DIR/generics-gen-args-errors.rs:84:24
|
||||
|
|
||||
LL | reuse Trait::<asd, asd, asd, asd, asd, asdasa>::foo as bar1;
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find type `asd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:85:29
|
||||
--> $DIR/generics-gen-args-errors.rs:84:29
|
||||
|
|
||||
LL | reuse Trait::<asd, asd, asd, asd, asd, asdasa>::foo as bar1;
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find type `asd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:85:34
|
||||
--> $DIR/generics-gen-args-errors.rs:84:34
|
||||
|
|
||||
LL | reuse Trait::<asd, asd, asd, asd, asd, asdasa>::foo as bar1;
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find type `asd` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:85:39
|
||||
--> $DIR/generics-gen-args-errors.rs:84:39
|
||||
|
|
||||
LL | reuse Trait::<asd, asd, asd, asd, asd, asdasa>::foo as bar1;
|
||||
| ^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find type `asdasa` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:85:44
|
||||
--> $DIR/generics-gen-args-errors.rs:84:44
|
||||
|
|
||||
LL | reuse Trait::<asd, asd, asd, asd, asd, asdasa>::foo as bar1;
|
||||
| ^^^^^^ not found in this scope
|
||||
|
||||
error[E0425]: cannot find type `DDDD` in this scope
|
||||
--> $DIR/generics-gen-args-errors.rs:110:34
|
||||
--> $DIR/generics-gen-args-errors.rs:109:34
|
||||
|
|
||||
LL | reuse Trait::<1, 2, 'static, DDDD>::foo::<1, 2, 3, 4, 5, 6> as bar6;
|
||||
| ^^^^ not found in this scope
|
||||
|
||||
error[E0107]: function takes 2 lifetime arguments but 0 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:34:15
|
||||
--> $DIR/generics-gen-args-errors.rs:33:15
|
||||
|
|
||||
LL | reuse foo::<A, B, C> as xd;
|
||||
| ^^^ expected 2 lifetime arguments
|
||||
|
|
||||
note: function defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/generics-gen-args-errors.rs:7:8
|
||||
--> $DIR/generics-gen-args-errors.rs:6:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ -- --
|
||||
@@ -190,19 +190,19 @@ LL | reuse foo::<'a, 'b, A, B, C> as xd;
|
||||
| +++++++
|
||||
|
||||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
|
||||
--> $DIR/generics-gen-args-errors.rs:46:11
|
||||
--> $DIR/generics-gen-args-errors.rs:45:11
|
||||
|
|
||||
LL | reuse foo::<> as bar1;
|
||||
| ^^^ not allowed in type signatures
|
||||
|
||||
error[E0107]: function takes 2 lifetime arguments but 0 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:49:11
|
||||
--> $DIR/generics-gen-args-errors.rs:48:11
|
||||
|
|
||||
LL | reuse foo::<String, String> as bar2;
|
||||
| ^^^ expected 2 lifetime arguments
|
||||
|
|
||||
note: function defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/generics-gen-args-errors.rs:44:8
|
||||
--> $DIR/generics-gen-args-errors.rs:43:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ -- --
|
||||
@@ -212,7 +212,7 @@ LL | reuse foo::<'a, 'b, String, String> as bar2;
|
||||
| +++++++
|
||||
|
||||
error[E0107]: function takes 3 generic arguments but 2 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:49:11
|
||||
--> $DIR/generics-gen-args-errors.rs:48:11
|
||||
|
|
||||
LL | reuse foo::<String, String> as bar2;
|
||||
| ^^^ ------ ------ supplied 2 generic arguments
|
||||
@@ -220,7 +220,7 @@ LL | reuse foo::<String, String> as bar2;
|
||||
| expected 3 generic arguments
|
||||
|
|
||||
note: function defined here, with 3 generic parameters: `T`, `U`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:44:8
|
||||
--> $DIR/generics-gen-args-errors.rs:43:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ - - --------------
|
||||
@@ -230,7 +230,7 @@ LL | reuse foo::<String, String, N> as bar2;
|
||||
| +++
|
||||
|
||||
error[E0107]: function takes 2 lifetime arguments but 5 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:53:11
|
||||
--> $DIR/generics-gen-args-errors.rs:52:11
|
||||
|
|
||||
LL | reuse foo::<'static, _, 'asdasd, 'static, 'static, 'static, _> as bar3;
|
||||
| ^^^ --------------------------- help: remove the lifetime arguments
|
||||
@@ -238,19 +238,19 @@ LL | reuse foo::<'static, _, 'asdasd, 'static, 'static, 'static, _> as bar3;
|
||||
| expected 2 lifetime arguments
|
||||
|
|
||||
note: function defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/generics-gen-args-errors.rs:44:8
|
||||
--> $DIR/generics-gen-args-errors.rs:43:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ -- --
|
||||
|
||||
error[E0107]: function takes 3 generic arguments but 2 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:53:11
|
||||
--> $DIR/generics-gen-args-errors.rs:52:11
|
||||
|
|
||||
LL | reuse foo::<'static, _, 'asdasd, 'static, 'static, 'static, _> as bar3;
|
||||
| ^^^ expected 3 generic arguments ------- - supplied 2 generic arguments
|
||||
|
|
||||
note: function defined here, with 3 generic parameters: `T`, `U`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:44:8
|
||||
--> $DIR/generics-gen-args-errors.rs:43:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ - - --------------
|
||||
@@ -260,7 +260,7 @@ LL | reuse foo::<'static, _, 'asdasd, 'static, 'static, 'static, _, N> as ba
|
||||
| +++
|
||||
|
||||
error[E0107]: function takes 2 lifetime arguments but 1 lifetime argument was supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:57:11
|
||||
--> $DIR/generics-gen-args-errors.rs:56:11
|
||||
|
|
||||
LL | reuse foo::<String, 'static, 123, asdasd> as bar4;
|
||||
| ^^^ ------ supplied 1 lifetime argument
|
||||
@@ -268,7 +268,7 @@ LL | reuse foo::<String, 'static, 123, asdasd> as bar4;
|
||||
| expected 2 lifetime arguments
|
||||
|
|
||||
note: function defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/generics-gen-args-errors.rs:44:8
|
||||
--> $DIR/generics-gen-args-errors.rs:43:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ -- --
|
||||
@@ -278,13 +278,13 @@ LL | reuse foo::<String, 'static, 'static, 123, asdasd> as bar4;
|
||||
| +++++++++
|
||||
|
||||
error[E0107]: function takes 2 lifetime arguments but 0 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:61:11
|
||||
--> $DIR/generics-gen-args-errors.rs:60:11
|
||||
|
|
||||
LL | reuse foo::<1, 2, _, 4, 5, _> as bar5;
|
||||
| ^^^ expected 2 lifetime arguments
|
||||
|
|
||||
note: function defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/generics-gen-args-errors.rs:44:8
|
||||
--> $DIR/generics-gen-args-errors.rs:43:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ -- --
|
||||
@@ -294,7 +294,7 @@ LL | reuse foo::<'a, 'b, 1, 2, _, 4, 5, _> as bar5;
|
||||
| +++++++
|
||||
|
||||
error[E0107]: function takes 3 generic arguments but 6 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:61:11
|
||||
--> $DIR/generics-gen-args-errors.rs:60:11
|
||||
|
|
||||
LL | reuse foo::<1, 2, _, 4, 5, _> as bar5;
|
||||
| ^^^ --------- help: remove the unnecessary generic arguments
|
||||
@@ -302,19 +302,19 @@ LL | reuse foo::<1, 2, _, 4, 5, _> as bar5;
|
||||
| expected 3 generic arguments
|
||||
|
|
||||
note: function defined here, with 3 generic parameters: `T`, `U`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:44:8
|
||||
--> $DIR/generics-gen-args-errors.rs:43:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ - - --------------
|
||||
|
||||
error[E0107]: function takes 2 lifetime arguments but 0 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:65:11
|
||||
--> $DIR/generics-gen-args-errors.rs:64:11
|
||||
|
|
||||
LL | reuse foo::<1, 2,asd,String, { let x = 0; }> as bar6;
|
||||
| ^^^ expected 2 lifetime arguments
|
||||
|
|
||||
note: function defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/generics-gen-args-errors.rs:44:8
|
||||
--> $DIR/generics-gen-args-errors.rs:43:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ -- --
|
||||
@@ -324,7 +324,7 @@ LL | reuse foo::<'a, 'b, 1, 2,asd,String, { let x = 0; }> as bar6;
|
||||
| +++++++
|
||||
|
||||
error[E0107]: function takes 3 generic arguments but 5 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:65:11
|
||||
--> $DIR/generics-gen-args-errors.rs:64:11
|
||||
|
|
||||
LL | reuse foo::<1, 2,asd,String, { let x = 0; }> as bar6;
|
||||
| ^^^ ----------------------- help: remove the unnecessary generic arguments
|
||||
@@ -332,25 +332,25 @@ LL | reuse foo::<1, 2,asd,String, { let x = 0; }> as bar6;
|
||||
| expected 3 generic arguments
|
||||
|
|
||||
note: function defined here, with 3 generic parameters: `T`, `U`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:44:8
|
||||
--> $DIR/generics-gen-args-errors.rs:43:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ - - --------------
|
||||
|
||||
error[E0747]: constant provided when a type was expected
|
||||
--> $DIR/generics-gen-args-errors.rs:70:17
|
||||
--> $DIR/generics-gen-args-errors.rs:69:17
|
||||
|
|
||||
LL | reuse foo::<"asdasd", asd, "askdn", 'static, 'a> as bar7;
|
||||
| ^^^^^^^^
|
||||
|
||||
error[E0107]: function takes 2 lifetime arguments but 0 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:75:11
|
||||
--> $DIR/generics-gen-args-errors.rs:74:11
|
||||
|
|
||||
LL | reuse foo::<{}, {}, {}> as bar8;
|
||||
| ^^^ expected 2 lifetime arguments
|
||||
|
|
||||
note: function defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/generics-gen-args-errors.rs:44:8
|
||||
--> $DIR/generics-gen-args-errors.rs:43:8
|
||||
|
|
||||
LL | fn foo<'a: 'a, 'b: 'b, T: Clone, U: Clone, const N: usize>() {}
|
||||
| ^^^ -- --
|
||||
@@ -360,13 +360,13 @@ LL | reuse foo::<'a, 'b, {}, {}, {}> as bar8;
|
||||
| +++++++
|
||||
|
||||
error[E0107]: trait takes 3 lifetime arguments but 0 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:85:11
|
||||
--> $DIR/generics-gen-args-errors.rs:84:11
|
||||
|
|
||||
LL | reuse Trait::<asd, asd, asd, asd, asd, asdasa>::foo as bar1;
|
||||
| ^^^^^ expected 3 lifetime arguments
|
||||
|
|
||||
note: trait defined here, with 3 lifetime parameters: `'b`, `'c`, `'a`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ -- -- --
|
||||
@@ -376,7 +376,7 @@ LL | reuse Trait::<'b, 'c, 'a, asd, asd, asd, asd, asd, asdasa>::foo as bar1
|
||||
| +++++++++++
|
||||
|
||||
error[E0107]: trait takes 2 generic arguments but 6 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:85:11
|
||||
--> $DIR/generics-gen-args-errors.rs:84:11
|
||||
|
|
||||
LL | reuse Trait::<asd, asd, asd, asd, asd, asdasa>::foo as bar1;
|
||||
| ^^^^^ ----------------------- help: remove the unnecessary generic arguments
|
||||
@@ -384,13 +384,13 @@ LL | reuse Trait::<asd, asd, asd, asd, asd, asdasa>::foo as bar1;
|
||||
| expected 2 generic arguments
|
||||
|
|
||||
note: trait defined here, with 2 generic parameters: `T`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ - --------------
|
||||
|
||||
error[E0107]: trait takes 3 lifetime arguments but 2 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:95:11
|
||||
--> $DIR/generics-gen-args-errors.rs:94:11
|
||||
|
|
||||
LL | reuse Trait::<'static, 'static>::foo as bar2;
|
||||
| ^^^^^ ------- ------- supplied 2 lifetime arguments
|
||||
@@ -398,7 +398,7 @@ LL | reuse Trait::<'static, 'static>::foo as bar2;
|
||||
| expected 3 lifetime arguments
|
||||
|
|
||||
note: trait defined here, with 3 lifetime parameters: `'b`, `'c`, `'a`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ -- -- --
|
||||
@@ -408,19 +408,19 @@ LL | reuse Trait::<'static, 'static, 'static>::foo as bar2;
|
||||
| +++++++++
|
||||
|
||||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
|
||||
--> $DIR/generics-gen-args-errors.rs:95:11
|
||||
--> $DIR/generics-gen-args-errors.rs:94:11
|
||||
|
|
||||
LL | reuse Trait::<'static, 'static>::foo as bar2;
|
||||
| ^^^^^ not allowed in type signatures
|
||||
|
||||
error[E0107]: trait takes 3 lifetime arguments but 0 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:98:11
|
||||
--> $DIR/generics-gen-args-errors.rs:97:11
|
||||
|
|
||||
LL | reuse Trait::<1, 2, 3, 4, 5>::foo as bar3;
|
||||
| ^^^^^ expected 3 lifetime arguments
|
||||
|
|
||||
note: trait defined here, with 3 lifetime parameters: `'b`, `'c`, `'a`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ -- -- --
|
||||
@@ -430,7 +430,7 @@ LL | reuse Trait::<'b, 'c, 'a, 1, 2, 3, 4, 5>::foo as bar3;
|
||||
| +++++++++++
|
||||
|
||||
error[E0107]: trait takes 2 generic arguments but 5 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:98:11
|
||||
--> $DIR/generics-gen-args-errors.rs:97:11
|
||||
|
|
||||
LL | reuse Trait::<1, 2, 3, 4, 5>::foo as bar3;
|
||||
| ^^^^^ --------- help: remove the unnecessary generic arguments
|
||||
@@ -438,19 +438,19 @@ LL | reuse Trait::<1, 2, 3, 4, 5>::foo as bar3;
|
||||
| expected 2 generic arguments
|
||||
|
|
||||
note: trait defined here, with 2 generic parameters: `T`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ - --------------
|
||||
|
||||
error[E0107]: trait takes 3 lifetime arguments but 0 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:102:11
|
||||
--> $DIR/generics-gen-args-errors.rs:101:11
|
||||
|
|
||||
LL | reuse Trait::<1, 2, true>::foo as bar4;
|
||||
| ^^^^^ expected 3 lifetime arguments
|
||||
|
|
||||
note: trait defined here, with 3 lifetime parameters: `'b`, `'c`, `'a`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ -- -- --
|
||||
@@ -460,7 +460,7 @@ LL | reuse Trait::<'b, 'c, 'a, 1, 2, true>::foo as bar4;
|
||||
| +++++++++++
|
||||
|
||||
error[E0107]: trait takes 2 generic arguments but 3 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:102:11
|
||||
--> $DIR/generics-gen-args-errors.rs:101:11
|
||||
|
|
||||
LL | reuse Trait::<1, 2, true>::foo as bar4;
|
||||
| ^^^^^ ------ help: remove the unnecessary generic argument
|
||||
@@ -468,13 +468,13 @@ LL | reuse Trait::<1, 2, true>::foo as bar4;
|
||||
| expected 2 generic arguments
|
||||
|
|
||||
note: trait defined here, with 2 generic parameters: `T`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ - --------------
|
||||
|
||||
error[E0107]: trait takes 3 lifetime arguments but 1 lifetime argument was supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:106:11
|
||||
--> $DIR/generics-gen-args-errors.rs:105:11
|
||||
|
|
||||
LL | reuse Trait::<'static>::foo as bar5;
|
||||
| ^^^^^ ------- supplied 1 lifetime argument
|
||||
@@ -482,7 +482,7 @@ LL | reuse Trait::<'static>::foo as bar5;
|
||||
| expected 3 lifetime arguments
|
||||
|
|
||||
note: trait defined here, with 3 lifetime parameters: `'b`, `'c`, `'a`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ -- -- --
|
||||
@@ -492,13 +492,13 @@ LL | reuse Trait::<'static, 'static, 'static>::foo as bar5;
|
||||
| ++++++++++++++++++
|
||||
|
||||
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
|
||||
--> $DIR/generics-gen-args-errors.rs:106:11
|
||||
--> $DIR/generics-gen-args-errors.rs:105:11
|
||||
|
|
||||
LL | reuse Trait::<'static>::foo as bar5;
|
||||
| ^^^^^ not allowed in type signatures
|
||||
|
||||
error[E0107]: trait takes 3 lifetime arguments but 1 lifetime argument was supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:110:11
|
||||
--> $DIR/generics-gen-args-errors.rs:109:11
|
||||
|
|
||||
LL | reuse Trait::<1, 2, 'static, DDDD>::foo::<1, 2, 3, 4, 5, 6> as bar6;
|
||||
| ^^^^^ - supplied 1 lifetime argument
|
||||
@@ -506,7 +506,7 @@ LL | reuse Trait::<1, 2, 'static, DDDD>::foo::<1, 2, 3, 4, 5, 6> as bar6;
|
||||
| expected 3 lifetime arguments
|
||||
|
|
||||
note: trait defined here, with 3 lifetime parameters: `'b`, `'c`, `'a`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ -- -- --
|
||||
@@ -516,7 +516,7 @@ LL | reuse Trait::<1, 'static, 'static, 2, 'static, DDDD>::foo::<1, 2, 3, 4,
|
||||
| ++++++++++++++++++
|
||||
|
||||
error[E0107]: trait takes 2 generic arguments but 3 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:110:11
|
||||
--> $DIR/generics-gen-args-errors.rs:109:11
|
||||
|
|
||||
LL | reuse Trait::<1, 2, 'static, DDDD>::foo::<1, 2, 3, 4, 5, 6> as bar6;
|
||||
| ^^^^^ --------------- help: remove the unnecessary generic argument
|
||||
@@ -524,19 +524,19 @@ LL | reuse Trait::<1, 2, 'static, DDDD>::foo::<1, 2, 3, 4, 5, 6> as bar6;
|
||||
| expected 2 generic arguments
|
||||
|
|
||||
note: trait defined here, with 2 generic parameters: `T`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ - --------------
|
||||
|
||||
error[E0107]: method takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:110:41
|
||||
--> $DIR/generics-gen-args-errors.rs:109:41
|
||||
|
|
||||
LL | reuse Trait::<1, 2, 'static, DDDD>::foo::<1, 2, 3, 4, 5, 6> as bar6;
|
||||
| ^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: method defined here, with 1 lifetime parameter: `'d`
|
||||
--> $DIR/generics-gen-args-errors.rs:82:12
|
||||
--> $DIR/generics-gen-args-errors.rs:81:12
|
||||
|
|
||||
LL | fn foo<'d: 'd, U, const M: bool>(self) {}
|
||||
| ^^^ --
|
||||
@@ -546,7 +546,7 @@ LL | reuse Trait::<1, 2, 'static, DDDD>::foo::<'d, 1, 2, 3, 4, 5, 6> as bar6
|
||||
| +++
|
||||
|
||||
error[E0107]: method takes 2 generic arguments but 6 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:110:41
|
||||
--> $DIR/generics-gen-args-errors.rs:109:41
|
||||
|
|
||||
LL | reuse Trait::<1, 2, 'static, DDDD>::foo::<1, 2, 3, 4, 5, 6> as bar6;
|
||||
| ^^^ ------------ help: remove the unnecessary generic arguments
|
||||
@@ -554,13 +554,13 @@ LL | reuse Trait::<1, 2, 'static, DDDD>::foo::<1, 2, 3, 4, 5, 6> as bar6;
|
||||
| expected 2 generic arguments
|
||||
|
|
||||
note: method defined here, with 2 generic parameters: `U`, `M`
|
||||
--> $DIR/generics-gen-args-errors.rs:82:12
|
||||
--> $DIR/generics-gen-args-errors.rs:81:12
|
||||
|
|
||||
LL | fn foo<'d: 'd, U, const M: bool>(self) {}
|
||||
| ^^^ - -------------
|
||||
|
||||
error[E0107]: trait takes 3 lifetime arguments but 1 lifetime argument was supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:117:11
|
||||
--> $DIR/generics-gen-args-errors.rs:116:11
|
||||
|
|
||||
LL | reuse Trait::<Trait, Clone, _, 'static, dyn Send, _>::foo::<1, 2, 3, _, 6> as bar7;
|
||||
| ^^^^^ ----- supplied 1 lifetime argument
|
||||
@@ -568,7 +568,7 @@ LL | reuse Trait::<Trait, Clone, _, 'static, dyn Send, _>::foo::<1, 2, 3, _,
|
||||
| expected 3 lifetime arguments
|
||||
|
|
||||
note: trait defined here, with 3 lifetime parameters: `'b`, `'c`, `'a`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ -- -- --
|
||||
@@ -578,7 +578,7 @@ LL | reuse Trait::<Trait, 'static, 'static, Clone, _, 'static, dyn Send, _>:
|
||||
| ++++++++++++++++++
|
||||
|
||||
error[E0107]: trait takes 2 generic arguments but 5 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:117:11
|
||||
--> $DIR/generics-gen-args-errors.rs:116:11
|
||||
|
|
||||
LL | reuse Trait::<Trait, Clone, _, 'static, dyn Send, _>::foo::<1, 2, 3, _, 6> as bar7;
|
||||
| ^^^^^ --- help: remove the unnecessary generic argument
|
||||
@@ -586,19 +586,19 @@ LL | reuse Trait::<Trait, Clone, _, 'static, dyn Send, _>::foo::<1, 2, 3, _,
|
||||
| expected 2 generic arguments
|
||||
|
|
||||
note: trait defined here, with 2 generic parameters: `T`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:81:11
|
||||
--> $DIR/generics-gen-args-errors.rs:80:11
|
||||
|
|
||||
LL | trait Trait<'b, 'c, 'a, T, const N: usize>: Sized {
|
||||
| ^^^^^ - --------------
|
||||
|
||||
error[E0107]: method takes 1 lifetime argument but 0 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:117:59
|
||||
--> $DIR/generics-gen-args-errors.rs:116:59
|
||||
|
|
||||
LL | reuse Trait::<Trait, Clone, _, 'static, dyn Send, _>::foo::<1, 2, 3, _, 6> as bar7;
|
||||
| ^^^ expected 1 lifetime argument
|
||||
|
|
||||
note: method defined here, with 1 lifetime parameter: `'d`
|
||||
--> $DIR/generics-gen-args-errors.rs:82:12
|
||||
--> $DIR/generics-gen-args-errors.rs:81:12
|
||||
|
|
||||
LL | fn foo<'d: 'd, U, const M: bool>(self) {}
|
||||
| ^^^ --
|
||||
@@ -608,7 +608,7 @@ LL | reuse Trait::<Trait, Clone, _, 'static, dyn Send, _>::foo::<'d, 1, 2, 3
|
||||
| +++
|
||||
|
||||
error[E0107]: method takes 2 generic arguments but 5 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:117:59
|
||||
--> $DIR/generics-gen-args-errors.rs:116:59
|
||||
|
|
||||
LL | reuse Trait::<Trait, Clone, _, 'static, dyn Send, _>::foo::<1, 2, 3, _, 6> as bar7;
|
||||
| ^^^ --------- help: remove the unnecessary generic arguments
|
||||
@@ -616,13 +616,13 @@ LL | reuse Trait::<Trait, Clone, _, 'static, dyn Send, _>::foo::<1, 2, 3, _,
|
||||
| expected 2 generic arguments
|
||||
|
|
||||
note: method defined here, with 2 generic parameters: `U`, `M`
|
||||
--> $DIR/generics-gen-args-errors.rs:82:12
|
||||
--> $DIR/generics-gen-args-errors.rs:81:12
|
||||
|
|
||||
LL | fn foo<'d: 'd, U, const M: bool>(self) {}
|
||||
| ^^^ - -------------
|
||||
|
||||
error[E0107]: function takes 3 generic arguments but 6 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:11:9
|
||||
--> $DIR/generics-gen-args-errors.rs:10:9
|
||||
|
|
||||
LL | bar::<1, 2, 3, 4, 5, 6>();
|
||||
| ^^^ --------- help: remove the unnecessary generic arguments
|
||||
@@ -630,13 +630,13 @@ LL | bar::<1, 2, 3, 4, 5, 6>();
|
||||
| expected 3 generic arguments
|
||||
|
|
||||
note: function defined here, with 3 generic parameters: `T`, `U`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:8:18
|
||||
--> $DIR/generics-gen-args-errors.rs:7:18
|
||||
|
|
||||
LL | reuse foo as bar;
|
||||
| --- ^^^
|
||||
|
||||
error[E0107]: function takes 2 lifetime arguments but 5 lifetime arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:17:9
|
||||
--> $DIR/generics-gen-args-errors.rs:16:9
|
||||
|
|
||||
LL | bar::<'static, 'static, 'static, 'static, 'static>();
|
||||
| ^^^ --------------------------- help: remove the lifetime arguments
|
||||
@@ -644,19 +644,19 @@ LL | bar::<'static, 'static, 'static, 'static, 'static>();
|
||||
| expected 2 lifetime arguments
|
||||
|
|
||||
note: function defined here, with 2 lifetime parameters: `'a`, `'b`
|
||||
--> $DIR/generics-gen-args-errors.rs:8:18
|
||||
--> $DIR/generics-gen-args-errors.rs:7:18
|
||||
|
|
||||
LL | reuse foo as bar;
|
||||
| --- ^^^
|
||||
|
||||
error[E0747]: constant provided when a type was expected
|
||||
--> $DIR/generics-gen-args-errors.rs:20:23
|
||||
--> $DIR/generics-gen-args-errors.rs:19:23
|
||||
|
|
||||
LL | bar::<String, 1, 'static, i32, 'static>();
|
||||
| ^
|
||||
|
||||
error[E0107]: function takes 3 generic arguments but 5 generic arguments were supplied
|
||||
--> $DIR/generics-gen-args-errors.rs:25:9
|
||||
--> $DIR/generics-gen-args-errors.rs:24:9
|
||||
|
|
||||
LL | bar::<_, _, _, _, _>();
|
||||
| ^^^ ------ help: remove the unnecessary generic arguments
|
||||
@@ -664,13 +664,13 @@ LL | bar::<_, _, _, _, _>();
|
||||
| expected 3 generic arguments
|
||||
|
|
||||
note: function defined here, with 3 generic parameters: `T`, `U`, `N`
|
||||
--> $DIR/generics-gen-args-errors.rs:8:18
|
||||
--> $DIR/generics-gen-args-errors.rs:7:18
|
||||
|
|
||||
LL | reuse foo as bar;
|
||||
| --- ^^^
|
||||
|
||||
error[E0747]: unresolved item provided when a constant was expected
|
||||
--> $DIR/generics-gen-args-errors.rs:28:25
|
||||
--> $DIR/generics-gen-args-errors.rs:27:25
|
||||
|
|
||||
LL | bar::<asd, asd, asd>();
|
||||
| ^^^
|
||||
@@ -681,7 +681,7 @@ LL | bar::<asd, asd, { asd }>();
|
||||
| + +
|
||||
|
||||
error[E0747]: unresolved item provided when a constant was expected
|
||||
--> $DIR/generics-gen-args-errors.rs:34:27
|
||||
--> $DIR/generics-gen-args-errors.rs:33:27
|
||||
|
|
||||
LL | reuse foo::<A, B, C> as xd;
|
||||
| ^
|
||||
@@ -692,7 +692,7 @@ LL | reuse foo::<A, B, { C }> as xd;
|
||||
| + +
|
||||
|
||||
error[E0747]: constant provided when a type was expected
|
||||
--> $DIR/generics-gen-args-errors.rs:75:17
|
||||
--> $DIR/generics-gen-args-errors.rs:74:17
|
||||
|
|
||||
LL | reuse foo::<{}, {}, {}> as bar8;
|
||||
| ^^
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
//@ run-pass
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod to_reuse {
|
||||
pub fn foo<T, U>(_: T, y: U) -> U { y }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod bounds {
|
||||
trait Trait0 {}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
error[E0277]: the trait bound `bounds::S: Trait0` is not satisfied
|
||||
--> $DIR/impl-to-trait-method.rs:12:19
|
||||
--> $DIR/impl-to-trait-method.rs:11:19
|
||||
|
|
||||
LL | Self: Trait0,
|
||||
| ^^^^^^ unsatisfied trait bound
|
||||
|
|
||||
help: the trait `Trait0` is not implemented for `bounds::S`
|
||||
--> $DIR/impl-to-trait-method.rs:21:5
|
||||
--> $DIR/impl-to-trait-method.rs:20:5
|
||||
|
|
||||
LL | struct S(F);
|
||||
| ^^^^^^^^
|
||||
help: this trait has no implementations, consider adding one
|
||||
--> $DIR/impl-to-trait-method.rs:5:5
|
||||
--> $DIR/impl-to-trait-method.rs:4:5
|
||||
|
|
||||
LL | trait Trait0 {}
|
||||
| ^^^^^^^^^^^^
|
||||
@@ -20,7 +20,7 @@ LL + #![feature(trivial_bounds)]
|
||||
|
|
||||
|
||||
error[E0277]: the trait bound `bounds::F: Trait0` is not satisfied
|
||||
--> $DIR/impl-to-trait-method.rs:24:34
|
||||
--> $DIR/impl-to-trait-method.rs:23:34
|
||||
|
|
||||
LL | reuse Trait1::<T>::foo { &self.0 }
|
||||
| --- ^^^^^^^ unsatisfied trait bound
|
||||
@@ -28,17 +28,17 @@ LL | reuse Trait1::<T>::foo { &self.0 }
|
||||
| required by a bound introduced by this call
|
||||
|
|
||||
help: the trait `Trait0` is not implemented for `bounds::F`
|
||||
--> $DIR/impl-to-trait-method.rs:18:5
|
||||
--> $DIR/impl-to-trait-method.rs:17:5
|
||||
|
|
||||
LL | struct F;
|
||||
| ^^^^^^^^
|
||||
help: this trait has no implementations, consider adding one
|
||||
--> $DIR/impl-to-trait-method.rs:5:5
|
||||
--> $DIR/impl-to-trait-method.rs:4:5
|
||||
|
|
||||
LL | trait Trait0 {}
|
||||
| ^^^^^^^^^^^^
|
||||
note: required by a bound in `Trait1::foo`
|
||||
--> $DIR/impl-to-trait-method.rs:12:19
|
||||
--> $DIR/impl-to-trait-method.rs:11:19
|
||||
|
|
||||
LL | fn foo<U>(&self)
|
||||
| --- required by a bound in this associated function
|
||||
@@ -47,7 +47,7 @@ LL | Self: Trait0,
|
||||
| ^^^^^^ required by this bound in `Trait1::foo`
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/impl-to-trait-method.rs:39:22
|
||||
--> $DIR/impl-to-trait-method.rs:38:22
|
||||
|
|
||||
LL | reuse Trait::foo { &self.0 }
|
||||
| ^^^ cannot infer type for type parameter `T` declared on the trait `Trait`
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
use std::iter::{Iterator, Map};
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait<T> {
|
||||
fn foo<U>(&self, x: T, y: U) -> (T, U) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
//! This is one of the mapping tests, which tests mapping of delegee parent and child
|
||||
//! generic params, whose main goal is to create cases with
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
//! This is one of the mapping tests, which tests mapping of delegee parent and child
|
||||
//! generic params, whose main goal is to create cases with
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
#![allow(late_bound_lifetime_arguments)]
|
||||
|
||||
//! This is one of the mapping tests, which tests mapping of delegee parent and child
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
#![allow(late_bound_lifetime_arguments)]
|
||||
|
||||
//! This is one of the mapping tests, which tests mapping of delegee parent and child
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
//! This is one of the mapping tests, which tests mapping of delegee parent and child
|
||||
//! generic params, whose main goal is to create cases with
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
#![allow(late_bound_lifetime_arguments)]
|
||||
|
||||
//! This is one of the mapping tests, which tests mapping of delegee parent and child
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
//! This is one of the mapping tests, which tests mapping of delegee parent and child
|
||||
//! generic params, whose main goal is to create cases with
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
#![allow(late_bound_lifetime_arguments)]
|
||||
|
||||
//! This is one of the mapping tests, which tests mapping of delegee parent and child
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ check-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
#![feature(staged_api)]
|
||||
#![unstable(feature = "foo", issue = "none")]
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#![feature(iter_partition_in_place)]
|
||||
#![feature(trusted_random_access)]
|
||||
#![feature(try_find)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
impl X {
|
||||
//~^ ERROR: cannot find type `X` in this scope
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
error[E0425]: cannot find type `X` in this scope
|
||||
--> $DIR/synth-params-ice-143498.rs:20:6
|
||||
--> $DIR/synth-params-ice-143498.rs:19:6
|
||||
|
|
||||
LL | impl X {
|
||||
| ^ not found in this scope
|
||||
|
||||
error[E0575]: expected method or associated constant, found associated type `Iterator::Item`
|
||||
--> $DIR/synth-params-ice-143498.rs:22:10
|
||||
--> $DIR/synth-params-ice-143498.rs:21:10
|
||||
|
|
||||
LL | reuse< std::fmt::Debug as Iterator >::*;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a method or associated constant
|
||||
|
||||
error[E0782]: expected a type, found a trait
|
||||
--> $DIR/synth-params-ice-143498.rs:22:12
|
||||
--> $DIR/synth-params-ice-143498.rs:21:12
|
||||
|
|
||||
LL | reuse< std::fmt::Debug as Iterator >::*;
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
// Testing delegation from trait impl to free functions.
|
||||
mod test_1 {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0107]: function takes at most 2 generic arguments but 3 generic arguments were supplied
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:25:25
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:24:25
|
||||
|
|
||||
LL | reuse to_reuse::bar;
|
||||
| ^^^
|
||||
@@ -8,31 +8,31 @@ LL | reuse to_reuse::bar;
|
||||
| help: remove the unnecessary generic argument
|
||||
|
|
||||
note: function defined here, with at most 2 generic parameters: `A`, `B`
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:7:16
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:6:16
|
||||
|
|
||||
LL | pub fn bar<'a: 'a, 'b: 'b, A, B>(x: &super::XX) {}
|
||||
| ^^^ - -
|
||||
|
||||
error[E0107]: function takes 0 generic arguments but 3 generic arguments were supplied
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:28:25
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:27:25
|
||||
|
|
||||
LL | reuse to_reuse::bar1;
|
||||
| ^^^^ expected 0 generic arguments
|
||||
|
|
||||
note: function defined here, with 0 generic parameters
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:8:16
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:7:16
|
||||
|
|
||||
LL | pub fn bar1(x: &super::XX) {}
|
||||
| ^^^^
|
||||
|
||||
error[E0284]: type annotations needed
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:31:25
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:30:25
|
||||
|
|
||||
LL | reuse to_reuse::bar2;
|
||||
| ^^^^ cannot infer the value of the const parameter `X` declared on the function `bar2`
|
||||
|
|
||||
note: required by a const generic parameter in `bar2`
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:9:39
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:8:39
|
||||
|
|
||||
LL | pub fn bar2<A, B, C, D, E, F, const X: usize, const Y: bool>(x: &super::XX) {}
|
||||
| ^^^^^^^^^^^^^^ required by this const generic parameter in `bar2`
|
||||
@@ -42,13 +42,13 @@ LL | reuse to_reuse::bar2::<A, B, C, D, E, F, X, Y>;
|
||||
| ++++++++++++++++++++++++++
|
||||
|
||||
error[E0284]: type annotations needed
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:31:25
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:30:25
|
||||
|
|
||||
LL | reuse to_reuse::bar2;
|
||||
| ^^^^ cannot infer the value of the const parameter `Y` declared on the function `bar2`
|
||||
|
|
||||
note: required by a const generic parameter in `bar2`
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:9:55
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:8:55
|
||||
|
|
||||
LL | pub fn bar2<A, B, C, D, E, F, const X: usize, const Y: bool>(x: &super::XX) {}
|
||||
| ^^^^^^^^^^^^^ required by this const generic parameter in `bar2`
|
||||
@@ -58,13 +58,13 @@ LL | reuse to_reuse::bar2::<A, B, C, D, E, F, X, Y>;
|
||||
| ++++++++++++++++++++++++++
|
||||
|
||||
error[E0107]: missing generics for trait `test_2::Trait1`
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:61:21
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:60:21
|
||||
|
|
||||
LL | reuse <X as Trait1>::bar;
|
||||
| ^^^^^^ expected 2 generic arguments
|
||||
|
|
||||
note: trait defined here, with 2 generic parameters: `A`, `B`
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:52:11
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:51:11
|
||||
|
|
||||
LL | trait Trait1<A, B> {
|
||||
| ^^^^^^ - -
|
||||
@@ -74,13 +74,13 @@ LL | reuse <X as Trait1<A, B>>::bar;
|
||||
| ++++++
|
||||
|
||||
error[E0107]: missing generics for trait `test_2::Trait1`
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:68:21
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:67:21
|
||||
|
|
||||
LL | reuse <X as Trait1>::bar::<'static, u32, u32, 1> as bar3;
|
||||
| ^^^^^^ expected 2 generic arguments
|
||||
|
|
||||
note: trait defined here, with 2 generic parameters: `A`, `B`
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:52:11
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:51:11
|
||||
|
|
||||
LL | trait Trait1<A, B> {
|
||||
| ^^^^^^ - -
|
||||
@@ -90,13 +90,13 @@ LL | reuse <X as Trait1<A, B>>::bar::<'static, u32, u32, 1> as bar3;
|
||||
| ++++++
|
||||
|
||||
error[E0107]: missing generics for trait `test_2::Trait1`
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:71:21
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:70:21
|
||||
|
|
||||
LL | reuse <X as Trait1>::bar as bar4;
|
||||
| ^^^^^^ expected 2 generic arguments
|
||||
|
|
||||
note: trait defined here, with 2 generic parameters: `A`, `B`
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:52:11
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:51:11
|
||||
|
|
||||
LL | trait Trait1<A, B> {
|
||||
| ^^^^^^ - -
|
||||
@@ -106,37 +106,37 @@ LL | reuse <X as Trait1<A, B>>::bar as bar4;
|
||||
| ++++++
|
||||
|
||||
error[E0107]: associated function takes 0 generic arguments but 3 generic arguments were supplied
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:96:40
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:95:40
|
||||
|
|
||||
LL | reuse <X as Trait1::<(), ()>>::bar;
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: associated function defined here, with 0 generic parameters
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:87:12
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:86:12
|
||||
|
|
||||
LL | fn bar() {}
|
||||
| ^^^
|
||||
|
||||
error[E0107]: associated function takes 0 generic arguments but 3 generic arguments were supplied
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:99:40
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:98:40
|
||||
|
|
||||
LL | reuse <X as Trait1::<(), ()>>::bar as bar1;
|
||||
| ^^^ expected 0 generic arguments
|
||||
|
|
||||
note: associated function defined here, with 0 generic parameters
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:87:12
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:86:12
|
||||
|
|
||||
LL | fn bar() {}
|
||||
| ^^^
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:102:40
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:101:40
|
||||
|
|
||||
LL | reuse <X as Trait1::<(), ()>>::foo as bar2;
|
||||
| ^^^ cannot infer type of the type parameter `X` declared on the associated function `foo`
|
||||
|
||||
error[E0107]: associated function takes at most 2 generic arguments but 3 generic arguments were supplied
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:105:40
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:104:40
|
||||
|
|
||||
LL | reuse <X as Trait1::<(), ()>>::foo as bar3;
|
||||
| ^^^
|
||||
@@ -145,7 +145,7 @@ LL | reuse <X as Trait1::<(), ()>>::foo as bar3;
|
||||
| help: remove the unnecessary generic argument
|
||||
|
|
||||
note: associated function defined here, with at most 2 generic parameters: `X`, `Y`
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:88:12
|
||||
--> $DIR/trait-impl-wrong-args-count.rs:87:12
|
||||
|
|
||||
LL | fn foo<X, Y>() {}
|
||||
| ^^^ - -
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ run-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod to_reuse {
|
||||
pub fn foo<T>(x: T) -> T { x }
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait{
|
||||
fn bar();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0425]: cannot find function `missing` in this scope
|
||||
--> $DIR/unresolved-segment-ice-153389.rs:9:11
|
||||
--> $DIR/unresolved-segment-ice-153389.rs:8:11
|
||||
|
|
||||
LL | reuse missing::<> as bar;
|
||||
| ^^^^^^^ not found in this scope
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {}
|
||||
struct S;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: expected trait, found struct `S`
|
||||
--> $DIR/glob-bad-path.rs:9:11
|
||||
--> $DIR/glob-bad-path.rs:8:11
|
||||
|
|
||||
LL | reuse S::*;
|
||||
| ^ not a trait
|
||||
|
||||
error[E0433]: cannot find module or crate `unresolved` in this scope
|
||||
--> $DIR/glob-bad-path.rs:8:11
|
||||
--> $DIR/glob-bad-path.rs:7:11
|
||||
|
|
||||
LL | reuse unresolved::*;
|
||||
| ^^^^^^^^^^ use of unresolved module or unlinked crate `unresolved`
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait1 {
|
||||
fn method(&self) -> u8;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0201]: duplicate definitions with name `method`:
|
||||
--> $DIR/glob-glob-conflict.rs:27:5
|
||||
--> $DIR/glob-glob-conflict.rs:26:5
|
||||
|
|
||||
LL | fn method(&self) -> u8;
|
||||
| ----------------------- item in trait
|
||||
@@ -10,7 +10,7 @@ LL | reuse Trait2::*;
|
||||
| ^^^^^^^^^^^^^^^^ duplicate definition
|
||||
|
||||
error[E0201]: duplicate definitions with name `method`:
|
||||
--> $DIR/glob-glob-conflict.rs:33:5
|
||||
--> $DIR/glob-glob-conflict.rs:32:5
|
||||
|
|
||||
LL | fn method(&self) -> u8;
|
||||
| ----------------------- item in trait
|
||||
@@ -21,13 +21,13 @@ LL | reuse Trait1::*;
|
||||
| ^^^^^^^^^^^^^^^^ duplicate definition
|
||||
|
||||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> $DIR/glob-glob-conflict.rs:27:19
|
||||
--> $DIR/glob-glob-conflict.rs:26:19
|
||||
|
|
||||
LL | reuse Trait2::*;
|
||||
| ^ argument #1 of type `&_` is missing
|
||||
|
|
||||
note: method defined here
|
||||
--> $DIR/glob-glob-conflict.rs:8:8
|
||||
--> $DIR/glob-glob-conflict.rs:7:8
|
||||
|
|
||||
LL | fn method(&self) -> u8;
|
||||
| ^^^^^^ ----
|
||||
@@ -37,7 +37,7 @@ LL | reuse Trait2::*(/* value */);
|
||||
| +++++++++++++
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/glob-glob-conflict.rs:27:19
|
||||
--> $DIR/glob-glob-conflict.rs:26:19
|
||||
|
|
||||
LL | reuse Trait2::*;
|
||||
| ^- help: consider using a semicolon here: `;`
|
||||
@@ -46,13 +46,13 @@ LL | reuse Trait2::*;
|
||||
| expected `()` because of default return type
|
||||
|
||||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> $DIR/glob-glob-conflict.rs:33:19
|
||||
--> $DIR/glob-glob-conflict.rs:32:19
|
||||
|
|
||||
LL | reuse Trait1::*;
|
||||
| ^ argument #1 of type `&_` is missing
|
||||
|
|
||||
note: method defined here
|
||||
--> $DIR/glob-glob-conflict.rs:5:8
|
||||
--> $DIR/glob-glob-conflict.rs:4:8
|
||||
|
|
||||
LL | fn method(&self) -> u8;
|
||||
| ^^^^^^ ----
|
||||
@@ -62,7 +62,7 @@ LL | reuse Trait1::*(/* value */);
|
||||
| +++++++++++++
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/glob-glob-conflict.rs:33:19
|
||||
--> $DIR/glob-glob-conflict.rs:32:19
|
||||
|
|
||||
LL | reuse Trait1::*;
|
||||
| ^- help: consider using a semicolon here: `;`
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ check-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod inner {
|
||||
pub trait TraitFoo {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
fn method(&self);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0324]: item `CONST` is an associated method, which doesn't match its trait `Trait`
|
||||
--> $DIR/glob-non-fn.rs:30:5
|
||||
--> $DIR/glob-non-fn.rs:29:5
|
||||
|
|
||||
LL | const CONST: u8;
|
||||
| ---------------- item in trait
|
||||
@@ -8,7 +8,7 @@ LL | reuse Trait::* { &self.0 }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ does not match trait
|
||||
|
||||
error[E0324]: item `Type` is an associated method, which doesn't match its trait `Trait`
|
||||
--> $DIR/glob-non-fn.rs:30:5
|
||||
--> $DIR/glob-non-fn.rs:29:5
|
||||
|
|
||||
LL | type Type;
|
||||
| ---------- item in trait
|
||||
@@ -17,7 +17,7 @@ LL | reuse Trait::* { &self.0 }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ does not match trait
|
||||
|
||||
error[E0201]: duplicate definitions with name `method`:
|
||||
--> $DIR/glob-non-fn.rs:30:5
|
||||
--> $DIR/glob-non-fn.rs:29:5
|
||||
|
|
||||
LL | fn method(&self);
|
||||
| ----------------- item in trait
|
||||
@@ -29,19 +29,19 @@ LL | reuse Trait::* { &self.0 }
|
||||
| previous definition here
|
||||
|
||||
error[E0423]: expected function, found associated constant `Trait::CONST`
|
||||
--> $DIR/glob-non-fn.rs:30:11
|
||||
--> $DIR/glob-non-fn.rs:29:11
|
||||
|
|
||||
LL | reuse Trait::* { &self.0 }
|
||||
| ^^^^^ not a function
|
||||
|
||||
error[E0423]: expected function, found associated type `Trait::Type`
|
||||
--> $DIR/glob-non-fn.rs:30:11
|
||||
--> $DIR/glob-non-fn.rs:29:11
|
||||
|
|
||||
LL | reuse Trait::* { &self.0 }
|
||||
| ^^^^^ not a function
|
||||
|
||||
error[E0046]: not all trait items implemented, missing: `CONST`, `Type`, `method`
|
||||
--> $DIR/glob-non-fn.rs:29:1
|
||||
--> $DIR/glob-non-fn.rs:28:1
|
||||
|
|
||||
LL | const CONST: u8;
|
||||
| --------------- `CONST` from trait
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
fn method() {}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
error: delegation is not supported in `extern` blocks
|
||||
--> $DIR/glob-non-impl.rs:15:5
|
||||
--> $DIR/glob-non-impl.rs:14:5
|
||||
|
|
||||
LL | reuse Trait::*;
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
error: glob delegation is only supported in impls
|
||||
--> $DIR/glob-non-impl.rs:8:1
|
||||
--> $DIR/glob-non-impl.rs:7:1
|
||||
|
|
||||
LL | reuse Trait::*;
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
error: glob delegation is only supported in impls
|
||||
--> $DIR/glob-non-impl.rs:11:5
|
||||
--> $DIR/glob-non-impl.rs:10:5
|
||||
|
|
||||
LL | reuse Trait::*;
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
error: glob delegation is only supported in impls
|
||||
--> $DIR/glob-non-impl.rs:19:5
|
||||
--> $DIR/glob-non-impl.rs:18:5
|
||||
|
|
||||
LL | reuse Trait::*;
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ check-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
fn foo(&self) -> u8;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
struct S;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error: qualified path without a trait in glob delegation
|
||||
--> $DIR/glob-traitless-qpath.rs:7:5
|
||||
--> $DIR/glob-traitless-qpath.rs:6:5
|
||||
|
|
||||
LL | reuse <u8>::*;
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
error: qualified path without a trait in glob delegation
|
||||
--> $DIR/glob-traitless-qpath.rs:8:5
|
||||
--> $DIR/glob-traitless-qpath.rs:7:5
|
||||
|
|
||||
LL | reuse <()>::*;
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ check-pass
|
||||
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
fn foo(&self) -> u8;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0428]: the name `foo` is defined multiple times
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:13:17
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:12:17
|
||||
|
|
||||
LL | fn foo() {}
|
||||
| -------- previous definition of the value `foo` here
|
||||
@@ -9,7 +9,7 @@ LL | reuse foo;
|
||||
= note: `foo` must be defined only once in the value namespace of this block
|
||||
|
||||
error: complex const arguments must be placed inside of a `const` block
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:11:13
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:10:13
|
||||
|
|
||||
LL | / {
|
||||
LL | | fn foo() {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: `#[deprecated]` attribute cannot be used on delegations
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:27:9
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:26:9
|
||||
|
|
||||
LL | #[deprecated]
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error[E0061]: this function takes 0 arguments but 1 argument was supplied
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:37:11
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:36:11
|
||||
|
|
||||
LL | reuse a as b {
|
||||
| ___________^______-
|
||||
@@ -9,7 +9,7 @@ LL | | }
|
||||
| |_____- unexpected argument of type `fn() {foo::<_>}`
|
||||
|
|
||||
note: function defined here
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:35:8
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:34:8
|
||||
|
|
||||
LL | fn a() {}
|
||||
| ^
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: complex const arguments must be placed inside of a `const` block
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:47:13
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:46:13
|
||||
|
|
||||
LL | / {
|
||||
LL | |
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error[E0425]: cannot find value `async` in this scope
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:66:13
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:65:13
|
||||
|
|
||||
LL | async || {};
|
||||
| ^^^^^ not found in this scope
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:66:22
|
||||
--> $DIR/hir-crate-items-before-lowering-ices.rs:65:22
|
||||
|
|
||||
LL | async || {};
|
||||
| ^^ expected `bool`, found `()`
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
//@ revisions: ice_155125 ice_155127 ice_155128 ice_155164 ice_155202
|
||||
|
||||
#![feature(min_generic_const_args, fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
#[cfg(ice_155125)]
|
||||
mod ice_155125 {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
fn a(&self) {}
|
||||
//~^ ERROR `self` parameter is only allowed in associated functions
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: `self` parameter is only allowed in associated functions
|
||||
--> $DIR/ice-isssue-128190.rs:4:6
|
||||
--> $DIR/ice-isssue-128190.rs:3:6
|
||||
|
|
||||
LL | fn a(&self) {}
|
||||
| ^^^^^ not semantically valid as function parameter
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
fn description(&self) -> &str {}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/ice-issue-122550.rs:5:35
|
||||
--> $DIR/ice-issue-122550.rs:4:35
|
||||
|
|
||||
LL | fn description(&self) -> &str {}
|
||||
| ^^ expected `&str`, found `()`
|
||||
|
||||
error[E0277]: the trait bound `S: Trait` is not satisfied
|
||||
--> $DIR/ice-issue-122550.rs:13:12
|
||||
--> $DIR/ice-issue-122550.rs:12:12
|
||||
|
|
||||
LL | reuse <S as Trait>::description { &self.0 }
|
||||
| ^ unsatisfied trait bound
|
||||
|
|
||||
help: the trait `Trait` is not implemented for `S`
|
||||
--> $DIR/ice-issue-122550.rs:10:1
|
||||
--> $DIR/ice-issue-122550.rs:9:1
|
||||
|
|
||||
LL | struct S(F);
|
||||
| ^^^^^^^^
|
||||
help: this trait has no implementations, consider adding one
|
||||
--> $DIR/ice-issue-122550.rs:4:1
|
||||
--> $DIR/ice-issue-122550.rs:3:1
|
||||
|
|
||||
LL | trait Trait {
|
||||
| ^^^^^^^^^^^
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/ice-issue-122550.rs:13:39
|
||||
--> $DIR/ice-issue-122550.rs:12:39
|
||||
|
|
||||
LL | reuse <S as Trait>::description { &self.0 }
|
||||
| ----------- ^^^^^^^ expected `&S`, found `&F`
|
||||
@@ -32,7 +32,7 @@ LL | reuse <S as Trait>::description { &self.0 }
|
||||
= note: expected reference `&S`
|
||||
found reference `&F`
|
||||
note: method defined here
|
||||
--> $DIR/ice-issue-122550.rs:5:8
|
||||
--> $DIR/ice-issue-122550.rs:4:8
|
||||
|
|
||||
LL | fn description(&self) -> &str {}
|
||||
| ^^^^^^^^^^^ -----
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod to_reuse {}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error[E0425]: cannot find function `foo` in module `to_reuse`
|
||||
--> $DIR/ice-issue-124342.rs:7:21
|
||||
--> $DIR/ice-issue-124342.rs:6:21
|
||||
|
|
||||
LL | reuse to_reuse::foo { foo }
|
||||
| ^^^ not found in `to_reuse`
|
||||
|
||||
error[E0425]: cannot find value `foo` in this scope
|
||||
--> $DIR/ice-issue-124342.rs:7:27
|
||||
--> $DIR/ice-issue-124342.rs:6:27
|
||||
|
|
||||
LL | reuse to_reuse::foo { foo }
|
||||
| ^^^
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait Trait {
|
||||
reuse Trait::foo { &self.0 }
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
error: failed to resolve delegation callee
|
||||
--> $DIR/ice-issue-124347.rs:5:18
|
||||
--> $DIR/ice-issue-124347.rs:4:18
|
||||
|
|
||||
LL | reuse Trait::foo { &self.0 }
|
||||
| ^^^
|
||||
|
||||
error: failed to resolve delegation callee
|
||||
--> $DIR/ice-issue-124347.rs:10:7
|
||||
--> $DIR/ice-issue-124347.rs:9:7
|
||||
|
|
||||
LL | reuse foo;
|
||||
| ^^^
|
||||
|
||||
error[E0061]: this function takes 0 arguments but 1 argument was supplied
|
||||
--> $DIR/ice-issue-124347.rs:5:18
|
||||
--> $DIR/ice-issue-124347.rs:4:18
|
||||
|
|
||||
LL | reuse Trait::foo { &self.0 }
|
||||
| ^^^ ------- unexpected argument
|
||||
|
|
||||
note: associated function defined here
|
||||
--> $DIR/ice-issue-124347.rs:5:18
|
||||
--> $DIR/ice-issue-124347.rs:4:18
|
||||
|
|
||||
LL | reuse Trait::foo { &self.0 }
|
||||
| ^^^
|
||||
@@ -28,7 +28,7 @@ LL + reuse Trait::fo&self.0 }
|
||||
|
|
||||
|
||||
warning: function cannot return without recursing
|
||||
--> $DIR/ice-issue-124347.rs:10:7
|
||||
--> $DIR/ice-issue-124347.rs:9:7
|
||||
|
|
||||
LL | reuse foo;
|
||||
| ^^^
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
trait HasSelf {
|
||||
fn method(self);
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
error[E0061]: this function takes 1 argument but 0 arguments were supplied
|
||||
--> $DIR/ice-issue-138362.rs:11:20
|
||||
--> $DIR/ice-issue-138362.rs:10:20
|
||||
|
|
||||
LL | reuse HasSelf::method;
|
||||
| ^^^^^^ argument #1 is missing
|
||||
|
|
||||
note: method defined here
|
||||
--> $DIR/ice-issue-138362.rs:5:8
|
||||
--> $DIR/ice-issue-138362.rs:4:8
|
||||
|
|
||||
LL | fn method(self);
|
||||
| ^^^^^^ ----
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#![feature(fn_delegation)]
|
||||
#![allow(incomplete_features)]
|
||||
|
||||
mod to_reuse {
|
||||
pub fn foo<T>() -> T {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user