Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- trait Slice<T> {} type CloneySlice = impl Clone + Slice<RangeTo<usize>>;
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error[E0412]: cannot find type `RangeTo` in this scope
- --> src/main.rs:6:65
- |
- 6 | trait Slice<T> {} type CloneySlice = impl Clone + Slice<RangeTo<usize>>;
- | ^^^^^^^ not found in this scope
- help: possible candidates are found in other modules, you can import them into scope
- |
- 4 | use core::ops::RangeTo;
- |
- 4 | use nom::lib::std::ops::RangeTo;
- |
- 4 | use std::ops::RangeTo;
- |
- error[E0562]: `impl Trait` not allowed outside of function and inherent method return types
- --> src/main.rs:6:46
- |
- 6 | trait Slice<T> {} type CloneySlice = impl Clone + Slice<RangeTo<usize>>;
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- error: aborting due to 2 previous errors
- Some errors have detailed explanations: E0412, E0562.
- For more information about an error, try `rustc --explain E0412`.
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement