rustc: Remove #[rustc_synthetic]
This function parameter attribute was introduced in https://github.com/rust-lang/rust/pull/44866 as an intermediate step in implementing `impl Trait`, it's not necessary or used anywhere by itself.
This commit is contained in:
parent
6414e0b5b3
commit
91e02177a1
17 changed files with 37 additions and 163 deletions
|
|
@ -1,28 +0,0 @@
|
|||
#![feature(rustc_attrs)]
|
||||
|
||||
fn func<#[rustc_synthetic] T>(_: T) {}
|
||||
|
||||
struct Foo;
|
||||
|
||||
impl Foo {
|
||||
pub fn func<#[rustc_synthetic] T>(_: T) {}
|
||||
}
|
||||
|
||||
struct Bar<S> {
|
||||
t: S
|
||||
}
|
||||
|
||||
impl<S> Bar<S> {
|
||||
pub fn func<#[rustc_synthetic] T>(_: T) {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
func::<u8>(42); //~ ERROR cannot provide explicit generic arguments
|
||||
func(42); // Ok
|
||||
|
||||
Foo::func::<u8>(42); //~ ERROR cannot provide explicit generic arguments
|
||||
Foo::func(42); // Ok
|
||||
|
||||
Bar::<i8>::func::<u8>(42); //~ ERROR cannot provide explicit generic arguments
|
||||
Bar::<i8>::func(42); // Ok
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
|
||||
--> $DIR/synthetic-param.rs:20:12
|
||||
|
|
||||
LL | func::<u8>(42);
|
||||
| ^^ explicit generic argument not allowed
|
||||
|
|
||||
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
|
||||
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
|
||||
--> $DIR/synthetic-param.rs:23:17
|
||||
|
|
||||
LL | Foo::func::<u8>(42);
|
||||
| ^^ explicit generic argument not allowed
|
||||
|
|
||||
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
|
||||
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error[E0632]: cannot provide explicit generic arguments when `impl Trait` is used in argument position
|
||||
--> $DIR/synthetic-param.rs:26:23
|
||||
|
|
||||
LL | Bar::<i8>::func::<u8>(42);
|
||||
| ^^ explicit generic argument not allowed
|
||||
|
|
||||
= note: see issue #83701 <https://github.com/rust-lang/rust/issues/83701> for more information
|
||||
= help: add `#![feature(explicit_generic_args_with_impl_trait)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0632`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue