- 26 3月, 2016 14 次提交
-
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
Otherwise, changing the current working directory can mess up runtime linking.
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
由 Michael Woerister 提交于
-
- 25 3月, 2016 8 次提交
-
-
由 bors 提交于
Disallow methods from traits that are not in scope This PR only allows a trait method to be used if the trait is in scope (fixes #31379). This is a [breaking-change]. For example, the following would break: ```rust mod foo { pub trait T { fn f(&self) {} } impl T for () {} } mod bar { pub use foo::T; } fn main() { pub use bar::*; struct T; // This shadows the trait `T`, ().f() // making this an error. } ``` r? @nikomatsakis
-
由 bors 提交于
Scopes in mir This PR adds scopes to MIR. There is a tree of scopes (each represented by a `ScopeId`). Every statement, variable, and terminator now has an associated scope and span. It also adds a `-Z dump-mir` switch one can use to conveniently examine the MIR as optimizations proceed. The intention is two-fold. First, to support MIR debug-info. This PR does not attempt to modify trans to make use of the scope information, however. Second, in a more temporary capacity, to support the goal of moving regionck and borowck into the MIR. To that end, the PR also constructs a "scope auxiliary" table storing the extent of each span (this is kept separate from the main MIR, since it contains node-ids) and the dom/post-dom of the region in the graph where the scope occurs. When we move to non-lexical lifetimes, I expect this auxiliary information to be discarded, but that is still some ways in the future (requires, at minimum, an RFC, and there are some thorny details to work out -- though I've got an in-progress draft). Right now, I'm just dropping this auxiliary information after it is constructed. I was debating for some time whether to add some sort of sanity tests, but decided to just open this PR instead, because I couldn't figure out what such a test would look like (and we don't have independent tests for this today beyond the regionck and borrowck tests). I'd prefer not to store the auxiliary data into any kind of "per-fn" map. Rather, I'd prefer that we do regionck/borrowck/whatever-else immediately after construction -- that is, we build the MIR for fn X and immediately thereafter do extended correctness checking on it. This will reduce peak memory usage and also ensure that the auxiliary data doesn't exist once optimizations begin. It also clarifies the transition point where static checks are complete and MIR can be more freely optimized. cc @rust-lang/compiler @nagisa
-
由 bors 提交于
Add core::ops::Range*::contains() as per rust-lang/rust#32311
-
由 bors 提交于
Remove `ErasedRegions` from substs This commit removes the `ErasedRegions` enum from `Substs`. Instead, in trans, we just generate a vector of `ReStatic` of suitable length. The goal is both general cleanup and to help pave the way for a glorious future where erasure is used in type check. r? @EddyB One concern: might be nice to do some profiling. Not sure the best way to do that. Perhaps I'll investigate running nrc's test suite locally.
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
This hack has long since outlived its usefulness; the transition to trans passing around full substitutions is basically done. Instead of `ErasedRegions`, just supply substitutions with a suitable number of `'static` entries, and invoke `erase_regions` when needed (the latter of which we already do).
-
由 Niko Matsakis 提交于
It no longer reads from `ast_ty_to_ty_cache`, which was very wrong. It also correctly handles higher-ranked regions.
-
由 bors 提交于
Rollup of 6 pull requests - Successful merges: #32276, #32416, #32452, #32459, #32462, #32464 - Failed merges:
-
- 24 3月, 2016 18 次提交
-
-
由 Steve Klabnik 提交于
Improve some Option code example Part of #29366. r? @steveklabnik
-
由 Steve Klabnik 提交于
Docs: some tiny corrections TNT->`tnt` firecracker->`firecracker`
-
由 Steve Klabnik 提交于
Include source text in JSON errors
-
由 Steve Klabnik 提交于
Add code examples for libstd/time Fixes #29379. r? @steveklabnik
-
由 Steve Klabnik 提交于
Add doc example to clone trait Fixes #29346. r? @steveklabnik
-
由 Steve Klabnik 提交于
doc: Stdin is not writable
-
由 Niko Matsakis 提交于
-
由 Guillaume Gomez 提交于
-
由 Niko Matsakis 提交于
We now visit more things (e.g., types) and also follow a deliberate style designed to reduce omissions.
-
由 Tang Chenglong 提交于
TNT->`tnt` firecracker->`firecracker`
-
由 bors 提交于
Make warnings of renamed and removed lints themselves lints This adds the `renamed_and_removed_lints` warning, defaulting to the warning level. Fixes #31141
-
由 Nick Cameron 提交于
-
由 NODA, Kai 提交于
Signed-off-by: NNODA, Kai <nodakai@gmail.com>
-
由 Niko Matsakis 提交于
while I'm at it, remove the "extra caching" that I was doing for no good reason except laziness. Basically before I was caching at each scope in the chain, but there's not really a reason to do that, since the cached entry point at level N is always equal to the last cached exit point from level N-1.
-
由 Brian Anderson 提交于
This adds the `renamed_and_removed_lints` warning, defaulting to the warning level. Fixes #31141
-
由 Brian Anderson 提交于
-
由 bors 提交于
add naked function tracking issue # to feature gate definition
-
由 Niko Matsakis 提交于
also, when exiting a scope, assign the final goto terminator with the target scope's id
-