| Age | Commit message (Collapse) | Author | Lines |
|
Fixes #20051
|
|
|
|
The docs currently define `array_expr`s as:
array_expr : '[' \"mut\" ? vec_elems? ']' ;
array_elems : [expr [',' expr]*] | [expr ',' \"..\" expr] ;
`vec_elems` is not defined anywhere else so it is probably a typo for `array_elems`.
|
|
Fixes #17481
|
|
This is a hack, but I don't think we can do much better as long as `derive` is
running at the syntax expansion phase.
If the custom_derive feature gate is enabled, this works with user-defined
traits and syntax extensions. Without the gate, you can't use e.g. #[derive_Clone]
directly, so this does not change the stable language.
This commit also cleans up the deriving code somewhat, and forbids some
previously-meaningless attribute syntax. For this reason it's technically a
[breaking-change]
|
|
Unstable items used in a macro expansion will now always trigger
stability warnings, *unless* the unstable items are directly inside a
macro marked with `#[allow_internal_unstable]`. IOW, the compiler warns
unless the span of the unstable item is a subspan of the definition of a
macro marked with that attribute.
E.g.
#[allow_internal_unstable]
macro_rules! foo {
($e: expr) => {{
$e;
unstable(); // no warning
only_called_by_foo!();
}}
}
macro_rules! only_called_by_foo {
() => { unstable() } // warning
}
foo!(unstable()) // warning
The unstable inside `foo` is fine, due to the attribute. But the
`unstable` inside `only_called_by_foo` is not, since that macro doesn't
have the attribute, and the `unstable` passed into `foo` is also not
fine since it isn't contained in the macro itself (that is, even though
it is only used directly in the macro).
In the process this makes the stability tracking much more precise,
e.g. previously `println!("{}", unstable())` got no warning, but now it
does. As such, this is a bug fix that may cause [breaking-change]s.
The attribute is definitely feature gated, since it explicitly allows
side-stepping the feature gating system.
|
|
Fixes #19674
Fixes #17396 (already closed, yeah)
cc @kmcallister , @cmr
|
|
|
|
The API this exposes is a little strange (being attached to `static`s),
so it makes sense to conservatively feature gate it. If it is highly
popular, it is possible to reverse this gating.
|
|
|
|
This is leftover from #21843
If you still have `|&:| {}` closures in your code, simply remove the `&:` part.
[breaking-change]
|
|
|
|
|
|
Closes #22698
|
|
Fixes #22424.
|
|
Update the reference page to the change in #20680.
|
|
The Rust Reference should include the tuple indexing (using a number
as a field) notation; currently it is only available on
http://doc.rust-lang.org/std/primitive.tuple.html and not easily
searchable.
|
|
Update the reference page to the change in #20680.
|
|
Fixes #22152
|
|
Fixes #22152
|
|
The Rust Reference should include the tuple indexing (using a number
as a field) notation; currently it is only available on
http://doc.rust-lang.org/std/primitive.tuple.html and not easily
searchable.
|
|
This patch adds the necessary pieces to support rust on Bitrig https://bitrig.org
|
|
Conflicts:
src/librustc/middle/infer/combine.rs
src/librustc_typeck/check/wf.rs
|
|
Conflicts:
src/libcollections/slice.rs
src/libcollections/str.rs
src/librustc/middle/lang_items.rs
src/librustc_back/rpath.rs
src/librustc_typeck/check/regionck.rs
src/libstd/ffi/os_str.rs
src/libsyntax/diagnostic.rs
src/libsyntax/parse/parser.rs
src/libsyntax/util/interner.rs
src/test/run-pass/regions-refcell.rs
|
|
|
|
|
|
|
|
fixes #22203
r? @nikomatsakis
This breaks code that might be using attributes randomly, so it's technically a
[breaking-change]
|
|
Fixes #22386
|
|
book/syntax-extensions.html was renamed to book/plugins.html,
the link should be also updated.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
|
|
|
|
Fixes #22386
|
|
book/syntax-extensions.html was renamed to book/plugins.html,
the link should be also updated.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
|
|
Fixes #19278
|
|
Fixes #14849
|
|
This isn't something we want to guarantee.
r? @nikomatsakis
|
|
r=steveklabnik
Added all active features to the list in reference.md.
Added a second note about keeping the reference.md list up-to-date to the bottom of the list, since not everyone (including me) reads the big comment at the top of it. :)
Ensured that the feature gate list in reference.md is kept in alphabetical order.
|
|
Fixes #22136
|
|
Fixes #19278
|
|
Fixes #14849
|
|
This isn't something we want to guarantee.
|
|
Added a second note about keeping the reference.md list up-to-date to
the bottom of the list, since not everyone (including me) reads the
big comment at the top of it. :)
Ensured that the feature gate list in reference.md is kept in
alphabetical order.
|
|
Fixes #22136
|
|
|
|
Replaced outdated use of the `range(start, end)` function where
approriate with `start..end`, and tweaked the examples to compile and run with the latest rust. I also fixed two periphery compile issues in reference.md which were occluding whether there were any new errors created by these changes, so I fixed them.
|
|
|
|
|
|
Fixes #20172
|
|
Rename several remaining `Show`s to Debug, `String`s to Display (mostly in comments and docs).
Update reference.md:
- derive() no longer supports Zero trait
- derive() now supports Copy trait
|
|
This was correct in the EBNF, but not in the prose (which seems to have
been copied-and-pasted from regular string literals).
|