| Age | Commit message (Collapse) | Author | Lines |
|
Before PR #32202, check_match tended to report bogus errors or ICE
when encountering a pattern that split a literal, e.g.
```Rust
match foo {
"bar" => {},
&_ => {}
}
```
That PR fixed these issues, but trans::_match generates bad code
when it encounters these matches. MIR trans has that fixed, but
it is waiting for 6 weeks in beta. Report an error when encountering
these instead.
Fixes issue #35044.
|
|
We used to write a temporary closure kind into the inference table, but
this could lead to obligations being incorrectled resolved before
inference had completed. This result could then be cached, leading to
further trouble. This patch avoids writing any closure kind until the
computation is complete.
Fixes #34349.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Move LLVM cleanup so modules are accessible during `after_llvm` phase
Fix for #34432. Also added a new phase controller `after_compilation_done` that gets called at the very end (i.e. after linking) at the suggestion of @nrc. The added test will segfault if the modules get deallocated too early, so it ensures the LLVM is not prematurely cleaned up.
r? @nrc
|
|
Use lazy iterator in vec/slice gdb pretty printers
|
|
|
|
|
|
Added a pretty printer for &mut slices
Fixes #30232
I have added a test which checks for correctness in gdb, but I need some help to do the same for lldb.
r? @Manishearth
|
|
Remove redundant `CompileController` entry points
Remove the `after_expand` and `after_write_deps` `CompileController` entry points.
The only things that separate these entry points from `after_hir_lowering` are dep-info generation and HIR map construction, neither of which is computationally intensive or has the potential to error.
r? @nrc
|
|
std: Stabilize APIs for the 1.11.0 release
Although the set of APIs being stabilized this release is relatively small, the
trains keep going! Listed below are the APIs in the standard library which have
either transitioned from unstable to stable or those from unstable to
deprecated.
Stable
* `BTreeMap::{append, split_off}`
* `BTreeSet::{append, split_off}`
* `Cell::get_mut`
* `RefCell::get_mut`
* `BinaryHeap::append`
* `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past
libstd stabilizations
* `Iterator::sum`
* `Iterator::product`
Deprecated
* `{f32, f64}::next_after`
* `{f32, f64}::integer_decode`
* `{f32, f64}::ldexp`
* `{f32, f64}::frexp`
* `num::One`
* `num::Zero`
Added APIs (all unstable)
* `iter::Sum`
* `iter::Product`
* `iter::Step` - a few methods were added to accomodate deprecation of One/Zero
Removed APIs
* `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is
unstable
Closes #27739
Closes #27752
Closes #32526
Closes #33444
Closes #34152
cc #34529 (new tracking issue)
|
|
|
|
Although the set of APIs being stabilized this release is relatively small, the
trains keep going! Listed below are the APIs in the standard library which have
either transitioned from unstable to stable or those from unstable to
deprecated.
Stable
* `BTreeMap::{append, split_off}`
* `BTreeSet::{append, split_off}`
* `Cell::get_mut`
* `RefCell::get_mut`
* `BinaryHeap::append`
* `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past
libstd stabilizations
* `Iterator::sum`
* `Iterator::product`
Deprecated
* `{f32, f64}::next_after`
* `{f32, f64}::integer_decode`
* `{f32, f64}::ldexp`
* `{f32, f64}::frexp`
* `num::One`
* `num::Zero`
Added APIs (all unstable)
* `iter::Sum`
* `iter::Product`
* `iter::Step` - a few methods were added to accomodate deprecation of One/Zero
Removed APIs
* `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is
unstable
Closes #27739
Closes #27752
Closes #32526
Closes #33444
Closes #34152
cc #34529 (new tracking issue)
|
|
Revert "Remove the return_address intrinsic."
This reverts commit b30134dbc3c29cf62a4518090e1389ff26918c19.
Servo might want this merged if they don't merge servo/servo#11872 soon.
cc @pnkfelix @jdm
|
|
fail obligations that depend on erroring obligations
Fix a bug where an obligation that depend on an erroring obligation would
be regarded as successful, leading to global cache pollution and random
lossage.
Fixes #33723.
Fixes #34503.
r? @eddyb since @nikomatsakis is on vacation
beta-nominating because of the massive lossage potential (e.g. with `Copy` this could lead to random memory leaks), plus this is a regression.
|
|
Disallow constants and statics from having unsized types.
This is a `[breaking-change]` which fixes #34390 by banning unsized `const` and `static`, e.g.:
```rust
const A: [i32] = *(&[0, 1, 2] as &[i32]);
static B: str = *"foo";
```
This was not intentionally allowed, and other than for `static` since some versions ago, it ICE'd.
If you've been taking advantage of this with `static`, you should be able to just use references instead.
|
|
Make the metadata lock more robust
Fixes #33778 and friends.
I also needed to add a metadata encoding version to rlibs, as they did not have it before. To keep it backwards-compatible, I added 4 zeroes to the start of the metadata, which are treated as an empty length field by older rustcs.
r? @alexcrichton
|
|
|
|
Add error codes in libsyntax
r? @jonathandturner
Fixes #34526
|
|
Fix a bug where an obligation that depend on an erroring obligation would
be regarded as successful, leading to global cache pollution and random
lossage.
Fixes #33723.
Fixes #34503.
|
|
name resolution
|
|
This reverts commit b30134dbc3c29cf62a4518090e1389ff26918c19.
|
|
Rollup of 5 pull requests
- Successful merges: #34105, #34305, #34512, ~~#34531,~~ #34547
|
|
|
|
Fix non-termination on recursive module re-exports in extern crates
Fixes #33776.
r? @nrc
|
|
rustdoc: Fix empty Implementations section on some module pages
These are caused by `DefaultImpl`s.
For example [`core::marker`](https://doc.rust-lang.org/nightly/core/marker/#impls).
|
|
rustdoc: Fix a few stripping issues
We need to recurse into stripped modules to strip things like impl methods
but when doing so we must not add any items to the `retained` set.
For example this removes [`core::num::ParseFloatError::__description`](https://doc.rust-lang.org/nightly/core/num/struct.ParseFloatError.html#method.__description) and [`impl Clone for ThreadRng`](https://doc.rust-lang.org/nightly/std/clone/trait.Clone.html).
|
|
Revert "skip double negation in const eval"
This reverts commit 735c018974e5570ea13fd887aa70a011a5b8e7b8.
fixes #34395
The original commit was based on a mis-understanding of the overflowing literal lint.
This needs to be ported to beta.
r? @eddyb
|
|
Forbid type parameters and global paths in macro invocations
Fixes #28558.
This is a [breaking-change]. For example, the following would break:
```rust
macro_rules! m { () => { () } }
fn main() {
m::<T>!(); // Type parameters are no longer allowed in macro invocations
::m!(); // Global paths are no longer allowed in macro invocations
}
```
Any breakage can be fixed by removing the type parameters or the leading `::` (respectively).
r? @eddyb
|
|
Add regression test for #33455
Closes #33455.
|
|
Treat `MultiDecorator`s as a special case of `MultiModifier`s
This deals with #32950 by using @durka's [option 1](https://github.com/rust-lang/rust/pull/33769#issuecomment-221774136).
r? @nrc
|
|
|
|
|
|
|
|
These are caused by `DefaultImpl`s.
|
|
rustdoc: Fix inlined renamed reexports in import lists
Fixes #34473
|
|
Batch up libsyntax breaking changes
Batch of the following syntax-[breaking-change] changes:
- #34213: Add a variant `Macro` to `TraitItemKind`
- #34368: Merge the variant `QPath` of `PatKind` into the variant `PatKind::Path`
- #34385: Move `syntax::ast::TokenTree` into a new module `syntax::tokenstream`
- #33943:
- Remove the type parameter from `visit::Visitor`
- Remove `attr::WithAttrs` -- use `attr::HasAttrs` instead.
- Change `fold_tt`/`fold_tts` to take token trees by value and avoid wrapping token trees in `Rc`.
- Remove the field `ctxt` of `ast::Mac_`
- Remove inherent method `attrs()` of types -- use the method `attrs` of `HasAttrs` instead.
- #34316:
- Remove `ast::Decl`/`ast::DeclKind` and add variants `Local` and `Item` to `StmtKind`.
- Move the node id for statements from the `StmtKind` variants to a field of `Stmt` (making `Stmt` a struct instead of an alias for `Spanned<StmtKind>`)
- Rename `ast::ExprKind::Again` to `Continue`.
- #34339: Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>`
- Use `.into()` in convert between `Vec<Attribute>` and `ThinVec<Attribute>`
- Use autoderef instead of `.as_attr_slice()`
- #34436: Remove the optional expression from `ast::Block` and instead use a `StmtKind::Expr` at the end of the statement list.
- #34403: Move errors into a separate crate (unlikely to cause breakage)
|
|
We need to recurse into stripped modules to strip things like impl methods
but when doing so we must not add any items to the `retained` set.
|
|
This reverts commit 735c018974e5570ea13fd887aa70a011a5b8e7b8.
|
|
Add regression test for #24424.
Fixes https://github.com/rust-lang/rust/issues/24424.
|
|
Don't translate vtable methods with Self: Sized bounds.
Fixes #34416.
|
|
|
|
Remove the return_address intrinsic.
This intrinsic to get the return pointer was introduced in #16248 / #16081 by @pcwalton for Servo.
However, as explained in #34227, it's impossible to ensure it's used correctly, and it broke with `-Zorbit`.
Servo's usage is being replaced in servo/servo#11872, and I expect nobody else to have abused it.
But I've also started a crater run, just in case this is a `[breaking-change]` for anyone else.
|
|
|
|
Revert a change to the relative path for macro-expanded `include!`s
Fixes #34431 (c.f. discussion in that issue).
r? @nrc
|
|
|