| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Closes #17709
|
|
|
|
Closes #15914.
|
|
|
|
This rewrites them to the current `ItemStatic` production of the compiler, but I
want to get this into a snapshot. It will be illegal to use a `static` in a
pattern of a `match` statement, so all those current uses will need to be
rewritten to `const` once it's implemented. This requires that the stage0
snapshot is able to parse `const`.
cc #17718
|
|
|
|
|
|
This breaks code that looks like:
match foo {
1..3 => { ... }
}
Instead, write:
match foo {
1...3 => { ... }
}
Closes #17295.
r? @nick29581
|
|
|
|
Modify ast::ExprMatch to include a new value of type ast::MatchSource,
making it easy to tell whether the match was written literally or
produced via desugaring. This allows us to customize error messages
appropriately.
|
|
|
|
This breaks code that looks like:
match foo {
1..3 => { ... }
}
Instead, write:
match foo {
1...3 => { ... }
}
Closes #17295.
[breaking-change]
|
|
in favor of `move`.
This breaks code that used `move` as an identifier, because it is now a
keyword. Change such identifiers to not use the keyword `move`.
Additionally, this breaks code that was counting on by-value or
by-reference capture semantics for unboxed closures (behind the feature
gate). Change `ref |:|` to `|:|` and `|:|` to `move |:|`.
Part of RFC #63; part of issue #12831.
[breaking-change]
|
|
They will ICE during typechecking if used, because they depend on trait
reform.
This is part of unboxed closures.
|
|
Fixes #17383.
|
|
Fixes #17383.
|
|
Display an explicit message about items missing after sugared doc
comment attributes. References #2789.
|
|
|
|
|
|
|
|
Part of issue #16640. I am leaving this issue open to handle parsing of
higher-rank lifetimes in traits.
This change breaks code that used unboxed closures:
* Instead of `F:|&: int| -> int`, write `F:Fn(int) -> int`.
* Instead of `F:|&mut: int| -> int`, write `F:FnMut(int) -> int`.
* Instead of `F:|: int| -> int`, write `F:FnOnce(int) -> int`.
[breaking-change]
|
|
This breaks code that looked like:
mymacro!(static::foo);
... where `mymacro!` expects a path or expression. Change such macros to
not accept keywords followed by `::`.
Closes #17298.
[breaking-change]
|
|
`expr[]`, `expr[expr..]`, `expr[..expr]`,`expr[expr..expr]`
Uses the Slice and SliceMut traits.
Allows ... as well as .. in range patterns.
|
|
|
|
|
|
The implementation essentially desugars during type collection and AST
type conversion time into the parameter scheme we have now. Only fully
qualified names--e.g. `<T as Foo>::Bar`--are supported.
|
|
|
|
Fixes #13490.
|
|
|
|
|
|
|
|
This prevents confusing errors when accidentally using an assignment
in an `if` expression. For example:
```rust
fn main() {
let x = 1u;
if x = x {
println!("{}", x);
}
}
```
Previously, this yielded:
```
test.rs:4:16: 4:17 error: expected `:`, found `!`
test.rs:4 println!("{}", x);
^
```
With this change, it now yields:
```
test.rs:3:8: 3:13 error: mismatched types: expected `bool`, found `()` (expected bool, found ())
test.rs:3 if x = x {
^~~~~
```
Closes issue #17283
|
|
This makes having multiple restrictions at once cleaner.
Also drop NO_DOUBLEBAR restriction since it is never used.
|
|
Replaces some usage of `.to_string()` with `.into_string()`
|
|
|
|
type they provide an implementation for.
This breaks code like:
mod foo {
struct Foo { ... }
}
impl foo::Foo {
...
}
Change this code to:
mod foo {
struct Foo { ... }
impl Foo {
...
}
}
Closes #17059.
RFC #155.
[breaking-change]
r? @brson
|
|
This adds ‘help’ diagnostic messages to rustc. This is used for anything that
provides help to the user, particularly the `--explain` messages that were
previously integrated into the relevant error message.
|
|
|
|
|
|
type they provide an implementation for.
This breaks code like:
mod foo {
struct Foo { ... }
}
impl foo::Foo {
...
}
Change this code to:
mod foo {
struct Foo { ... }
impl Foo {
...
}
}
Additionally, if you used the I/O path extension methods `stat`,
`lstat`, `exists`, `is_file`, or `is_dir`, note that these methods have
been moved to the the `std::io::fs::PathExtensions` trait. This breaks
code like:
fn is_it_there() -> bool {
Path::new("/foo/bar/baz").exists()
}
Change this code to:
use std::io::fs::PathExtensions;
fn is_it_there() -> bool {
Path::new("/foo/bar/baz").exists()
}
Closes #17059.
RFC #155.
[breaking-change]
|
|
Replaces some usage of `.to_string()` with `.into_string()`
Signed-off-by: Peter Atashian <retep998@gmail.com>
|
|
This allows code to access the fields of tuples and tuple structs behind the feature gate `tuple_indexing`:
```rust
#![feature(tuple_indexing)]
let x = (1i, 2i);
assert_eq!(x.1, 2);
struct Point(int, int);
let origin = Point(0, 0);
assert_eq!(origin.0, 0);
assert_eq!(origin.1, 0);
```
Implements [RFC 53](https://github.com/rust-lang/rfcs/blob/master/active/0053-tuple-accessors.md). Closes #16950.
|
|
Instead of `extern crate foo = bar`, write `extern crate bar as foo`.
Instead of `extern crate baz = "quux"`, write `extern crate "quux" as
baz`.
Closes #16461.
[breaking-change]
|
|
This allows code to access the fields of tuples and tuple structs:
let x = (1i, 2i);
assert_eq!(x.1, 2);
struct Point(int, int);
let origin = Point(0, 0);
assert_eq!(origin.0, 0);
assert_eq!(origin.1, 0);
|
|
instead of prefix `..`.
This breaks code that looked like:
match foo {
[ first, ..middle, last ] => { ... }
}
Change this code to:
match foo {
[ first, middle.., last ] => { ... }
}
RFC #55.
Closes #16967.
[breaking-change]
|
|
Its arguments were inverted.
|
|
|
|
r=alexcrichton
I corrected spelling and capitalization errors in comments and strings.
|
|
Changed occurances of:
extern crate foo = "bar";
to:
extern crate "bar" as foo;
Added warning for old deprecated syntax
|