| Age | Commit message (Collapse) | Author | Lines |
|
|
|
r=alexcrichton
Closes #21033. The new strategy for parsing a field pattern is to look 1 token ahead and if it's a colon, parse as "fieldname: pat", otherwise parse the shorthand form "(box) (ref) (mut) fieldname)". The previous strategy was to parse "(ref) (mut) fieldname" then if we encounter a colon, throw an error if either "ref" or "mut" were encountered.
|
|
|
|
This avoids having ast::Ty nodes which have no counterpart in the source.
|
|
|
|
* add `Token::AndAnd` (double borrow)
* add `Token::DotDot` (range notation)
* remove `Token::Pound` and `Token::At`
This fixes a syntax error when parsing `fn f() -> RangeTo<i32> { return ..1; }`.
Also, remove `fn_expr_lookahead`.
It's from the `fn~` days and seems to no longer be necessary.
|
|
Lets them build with the -dev, -nightly, or snapshot compiler
|
|
|
|
In accordance with [collections reform part 2][rfc] this macro has been moved to
an external [bitflags crate][crate] which is [available though
crates.io][cratesio]. Inside the standard distribution the macro has been moved
to a crate called `rustc_bitflags` for current users to continue using.
[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
[crate]: https://github.com/rust-lang/bitflags
[cratesio]: http://crates.io/crates/bitflags
The major user of `bitflags!` in terms of a public-facing possibly-stable API
today is the `FilePermissions` structure inside of `std::io`. This user,
however, will likely no longer use `bitflags!` after I/O reform has landed. To
prevent breaking APIs today, this structure remains as-is.
Current users of the `bitflags!` macro should add this to their `Cargo.toml`:
bitflags = "0.1"
and this to their crate root:
#[macro_use] extern crate bitflags;
Due to the removal of a public macro, this is a:
[breaking-change]
|
|
This stops the compiler ICEing on the use of SIMD types in FFI signatures. It emits correct code for LLVM intrinsics, but I am quite unsure about the ABI handling in general so I've added a new feature gate `simd_ffi` to try to ensure people don't use it without realising there's a non-trivial risk of codegen brokenness.
Closes #20043.
|
|
I don't know if this handling of SIMD types is correct for the C ABI on
all platforms, so lets add an even finer feature gate than just the
`simd` one.
The `simd` one can be used with (relatively) little risk of complete
nonsense, the reason for it is that it is likely that things will
change. Using the types in FFI with an incorrect ABI will at best give
absolute nonsense results, but possibly cause serious breakage too, so
this is a step up in badness, hence a new feature gate.
|
|
For a call like `foo.bar()` where the method `bar` can't be resolved,
the compiler will search for traits that have methods with name `bar` to
give a more informative error, providing a list of possibilities.
Closes #7643.
|
|
This fixes #16530 by hashing nullary structs [the same way as the empty tuple] (https://github.com/rust-lang/rust/blob/master/src/libcore/hash/mod.rs#L185). Other approaches are possible, but this was the simplest.
|
|
|
|
Currently, we build a closure that does nothing but pass its argument
through to another function, this is rather wasteful and creates lots of
unnecessary closures.
|
|
expansion now uses `::std::hash::Hash::hash(&*__self_0_0, __arg_0)` instead of
`(*__self_0_0).hash(__arg_0)`
closes #21160
r? @alexcrichton
|
|
Fixes #21045
|
|
libsyntax compiled without optimization uses a lot of stack, which can cause it to run out of stack space. This PR factors out some arm handlers from `print_expr` as well as converts `advance_left` into a loop. This helps to cut down on the stack usage.
|
|
Only the most recent changes (since November 2014) get a special error.
Fixes #20599
|
|
Allows modifiers to be used on methods, associated types, etc.
r? @sfackler
|
|
Syntax and a few fixed bugs etc.
|
|
|
|
|
|
Currently, we build a closure that does nothing but pass its argument
through to another function, this is rather wasteful and creates lots of
unnecessary closures.
|
|
fixes #16530
|
|
|
|
expansion now uses `::std::hash::Hash::hash(&*__self_0_0, __arg_0)` instead of
`(*__self_0_0).hash(__arg_0)`
closes #21160
|
|
|
|
Allows modifiers to be used on methods, associated types, etc.
|
|
Fixes #21045
|
|
|
|
|
|
|
|
|
|
For a call like `foo.bar()` where the method `bar` can't be resolved,
the compiler will search for traits that have methods with name `bar` to
give a more informative error, providing a list of possibilities.
Closes #7643.
|
|
|
|
|
|
Syntax and a few fixed bugs etc.
|
|
fixes #20783
r? @nikomatsakis
|
|
|
|
* add Token::AndAnd (double borrow)
* add Token::DotDot (range notation)
* remove Token::Pound and Token::At
Fixes a syntax error when parsing "fn f() -> RangeTo<i32> { return ..1; }".
Also, remove "fn_expr_lookahead".
It's from the fn~ days and seems to no longer be necessary.
|
|
Fix checking of command line expansion spans
Reviewed-by: alexcrichton
|
|
|
|
Closes #20711
|
|
|
|
This will temporarily prevent warnings generated from expanding to code that the
test harness itself uses. This solution will require tweaking around the beta
cycle, but it will prevent spurious warnings for now.
Closes #20823
|
|
|
|
Closes #20711
|
|
|
|
Conflicts:
src/test/compile-fail/borrowck-move-out-of-overloaded-auto-deref.rs
src/test/compile-fail/issue-2590.rs
src/test/compile-fail/lint-stability.rs
src/test/compile-fail/slice-mut-2.rs
src/test/compile-fail/std-uncopyable-atomics.rs
|