Comments (4)
Here is even smaller example:
#![feature(type_alias_impl_trait)]
fn foo<T2>(bar: T2) {
type T = impl Sized;
let x: T = || {};
}
fn main() {}
from rust.
Yes, all of these don't work anymore. You need to move the TAIT out of the function for now
from rust.
@rustbot label -needs-triage +F-type_alias_impl_trait +T-compiler
from rust.
Probably adding the generic parameter is what is wanted:
#![feature(type_alias_impl_trait)]
fn foo<U>() {
type T<V> = impl Sized;
let x: T<U> = || (); //~ OK
}
fn main() {}
This is a duplicate of:
E.g.:
#![feature(type_alias_impl_trait)]
type Ty = impl Sized;
fn test<'v, T, const U: usize>() -> Ty {
|| ()
//~^ ERROR type parameter `T` is part of concrete type but not
//~| used in parameter list for the `impl Trait` type alias
//~^ ERROR const parameter `U` is part of concrete type but not
//~| used in parameter list for the `impl Trait` type alias
}
fn main() {}
So let's close in favor of that issue.
from rust.
Related Issues (20)
- compile fail when using async_drop HOT 2
- Compiler Error E0530 When Shadowing None with mut keyword HOT 2
- `remove_dir_all` fails removing directores (with subdirectories) on network drives (SFTP) under windows HOT 28
- Two subsequent labels and unnecessary `jmp` with `opt-level=s` HOT 3
- Can the rust/build/x86_64-unknown-linux-gnu/stage0 directory be generated without network? HOT 2
- Strange TcpStream TTL type implementation (set_ttl/ttl) HOT 6
- Lint against using `libc::c_*` types in std if they're also avaliable in `core::ffi`
- `std::process::exit` is not thread-safe HOT 88
- compiletest: `./x test <test-name>.stderr` (or existing non-`.rs` file) should warn or error
- rustc hangs / infinite loop on small example with generic_const_exprs and specialization HOT 1
- integer_decode() for float: example usage in docs doesn't make sense HOT 1
- Confusing "Mismatched types" error due to unsatisfied trait bound HOT 3
- Tracking Issue for `x86_amx_intrinsics`
- Tracking Issue for `x86_sha512_sm`
- `#[coverage(..)]` attribute should apply recursively to nested functions/methods/closures HOT 1
- Coverage spans should not overlap nested items HOT 1
- rust lang analyzer is not working in vs code.
- `debuginfo` test suite shows zero tests being executed if pre-requisites are missing
- rust_eh_personality already defined in dynamic library HOT 5
- Tracking Issue for `#![feature(externally_constructed_attr)]`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.