| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
Don't suggest `let` bindings if they don't help with borrows
@oli-obk I have added a condition to address #52049, right now, this is on WIP because I think code change is also required on `error_reporting.rs`. Plus I need to check if any test cases fail.
I will ping you again if everything passes
r? @oli-obk
|
|
|
|
r=nikomatsakis
Dont run ast borrowck on mir mode
r? @nikomatsakis
|
|
|
|
|
|
For the HirIdification initiative #50928.
|
|
Namely: labels, type parameters, bindings in patterns, parameter names in functions without body.
All of these do not need hygiene after lowering to HIR, only span locations.
|
|
Update broken rustc-guide links
Recently, there has been some rearrangement of the content in the Rustc
Guide, and this commit changes the urls the match the updated guide.
|
|
Recently, there has been some rearrangement of the content in the Rustc
Guide, and this commit changes the urls the match the updated guide.
|
|
|
|
|
|
|
|
why the move wasn't a copy.
This should address #51190.
|
|
This commit is concerned with the case where the user tries to mutably
borrow a mutable reference, thereby triggering an error. Instead of the
existing suggestion to make the binding mutable, the compiler will now
suggest to avoid borrowing altogether.
|
|
`PointerKind` is included in `LoanPath` and hence forms part of the
equality check; this led to having two unequal paths that both
represent `*x`, depending on whether the `*` was inserted
automatically or explicitly. Bad mojo. The `note` field, in contrast,
is intended more-or-less primarily for this purpose of adding extra
data.
|
|
Changing the `each_binding` utility method to take the `HirId` of a
binding pattern rather than its `NodeId` seems like a modest first step
in support of the `HirId`ification initiative #50928. (The inspiration
for choosing this in particular came from the present author's previous
work on diagnostics issued during liveness analysis, which is the most
greatly affected module in this change.)
|
|
|
|
|
|
Avoid many `cmt` allocations.
`cmt` is a ref-counted wrapper around `cmt_` The use of refcounting
keeps `cmt` handling simple, but a lot of `cmt` instances are very
short-lived, and heap-allocating the short-lived ones takes up time.
This patch changes things in the following ways.
- Most of the functions that produced `cmt` instances now produce `cmt_`
instances. The `Rc::new` calls that occurred within those functions
now occur at their call sites (but only when necessary, which isn't
that often).
- Many of the functions that took `cmt` arguments now take `&cmt_`
arguments. This includes all the methods in the `Delegate` trait.
As a result, the vast majority of the heap allocations are avoided. In
an extreme case, the number of calls to malloc in tuple-stress drops
from 9.9M to 7.9M, a drop of 20%. And the compile times for many runs of
coercions, deep-vector, and tuple-stress drop by 1--2%.
|
|
`cmt` is a ref-counted wrapper around `cmt_` The use of refcounting
keeps `cmt` handling simple, but a lot of `cmt` instances are very
short-lived, and heap-allocating the short-lived ones takes up time.
This patch changes things in the following ways.
- Most of the functions that produced `cmt` instances now produce `cmt_`
instances. The `Rc::new` calls that occurred within those functions
now occur at their call sites (but only when necessary, which isn't
that often).
- Many of the functions that took `cmt` arguments now take `&cmt_`
arguments. This includes all the methods in the `Delegate` trait.
As a result, the vast majority of the heap allocations are avoided. In
an extreme case, the number of calls to malloc in tuple-stress drops
from 9.9M to 7.9M, a drop of 20%. And the compile times for many runs of
coercions, deep-vector, and tuple-stress drop by 1--2%.
|
|
|
|
Resolve them into field indices once and then use those resolutions
+ Fix rebase
|
|
|
|
Move deny(warnings) into rustbuild
This permits easier iteration without having to worry about warnings
being denied.
Fixes #49517
|
|
More thread-safety changes
r? @michaelwoerister
|
|
This permits easier iteration without having to worry about warnings
being denied.
Fixes #49517
|
|
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language
features!
|
|
This includes a submodule update to rustfmt
in order to allow a stable feature declaration.
|
|
|
|
Replace many of the last references to readmes
In particular, this removes the dep track readme, so it should not be merged before https://github.com/rust-lang-nursery/rustc-guide/pull/92
Fix #47935
cc #48478
r? @nikomatsakis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Disallow mutable borrow to non-mut statics
Closes #42344.
|
|
This path was considered to be unreachable. However,
`&mut` could potentially live inside `static`.
For example, `static TAB: [&mut [u8]; 0] = [];`.
|
|
Include space in suggestion `mut` in bindings
Fix #46614.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
across suspension points to borrowck. Fixes #44197, #45259 and #45093.
|
|
|