about summary refs log tree commit diff
path: root/src/librustc/ich
AgeCommit message (Collapse)AuthorLines
2018-04-06Remove more duplicated spansVadim Petrochenkov-1/+1
2018-04-06Rename `PathSegment::identifier` to `ident`Vadim Petrochenkov-1/+1
2018-04-06Use `Span` instead of `SyntaxContext` in `Ident`Vadim Petrochenkov-1/+1
2018-04-05Rollup merge of #49497 - scalexm:hrtb, r=nikomatsakisAlex Crichton-5/+7
Chalkify - Tweak `Clause` definition and HRTBs r? @nikomatsakis
2018-04-04Auto merge of #48333 - aidanhs:aphs-no-place-for-placement, r=nikomatsakisbors-1/+0
Remove all unstable placement features Closes #22181, #27779. Effectively makes the assortment of placement RFCs (rust-lang/rfcs#470, rust-lang/rfcs#809, rust-lang/rfcs#1228) 'unaccepted'. It leaves `box_syntax` and keeps the `<-` token as recognised by libsyntax. ------------------------ I don't know the correct process for unaccepting an unstable feature that was accepted as an RFC so...here's a PR. Let me preface this by saying I'm not particularly happy about doing this (I know it'll be unpopular), but I think it's the most honest expression of how things stand today. I've been motivated by a [post on reddit](https://www.reddit.com/r/rust/comments/7wrqk2/when_will_box_and_placementin_syntax_be_stable/) which asks when these features will be stable - the features have received little RFC-style design work since the end of 2015 (~2 years ago) and leaving them in limbo confuses people who want to know where they're up to. Without additional design work that needs to happen (see the collection of unresolved questions later in this post) they can't really get stabilised, and I think that design work would be most suited to an RFC rather than (currently mostly unused) experimental features in Rust nightly. I have my own motivations - it's very simple to 'defeat' placement in debug mode today and I don't want a placement in Rust that a) has no guarantees to work and b) has no plan for in-place serde deserialisation. There's a quote in [1]: "Ordinarily these uncertainties might lead to the RFC being postponed. [The RFC seems like a promising direction hence we will accept since it] will thus give us immediate experience with the design and help in determining the best final solution.". I propose that there have been enough additional uncertainties raised since then that the original direction is less promising and we should be think about the problem anew. (a historical note: the first mention of placement (under that name - uninit pointers were earlier) in an RFC AFAIK is [0] in late 2014 (pre-1.0). RFCs since then have built on this base - [1] is a comment in Feb 2015 accepting a more conservative design of the Place* traits - this is back when serde still required aster and seemed to break every other nightly! A lot has changed since then, perhaps placement should too) ------------------------ Concrete unresolved questions include: - making placement work in debug mode [7] - making placement work for serde/with fallible creation [5], [irlo2], [8] - trait design: - opting into not consuming the placer in `Placer::make_place` - [2] - trait proliferation - [4] (+ others in that thread) - fallible allocation - [3], [4] (+ others in that thread) - support for DSTs/unsized structs (if at all) - [1], [6] More speculative unresolved questions include: - better trait design with in the context of future language features [irlo1] (Q11), [irlo3] - interaction between custom allocators and placement [irlo3] [0] https://github.com/rust-lang/rfcs/pull/470 [1] https://github.com/rust-lang/rfcs/pull/809#issuecomment-73910414 [2] https://github.com/rust-lang/rfcs/issues/1286 [3] https://github.com/rust-lang/rfcs/issues/1315 [4] https://github.com/rust-lang/rust/issues/27779#issuecomment-146711893 [5] https://github.com/rust-lang/rust/issues/27779#issuecomment-285562402 [6] https://github.com/rust-lang/rust/issues/27779#issuecomment-354464938 [7] https://github.com/rust-lang/rust/issues/27779#issuecomment-358025344 [8] https://github.com/rust-lang/rfcs/pull/1228#issuecomment-190825370 [irlo1] https://internals.rust-lang.org/t/placement-nwbi-faq-new-box-in-left-arrow/2789 [irlo2] https://internals.rust-lang.org/t/placement-nwbi-faq-new-box-in-left-arrow/2789/19 [irlo3] https://internals.rust-lang.org/t/lang-team-minutes-feature-status-report-placement-in-and-box/4646
2018-04-03Auto merge of #49348 - bobtwinkles:extend_2pb, r=nikomatsakisbors-0/+4
Extend two-phase borrows to apply to method receiver autorefs Fixes #48598 by permitting two-phase borrows on the autorefs created when functions and methods.
2018-04-03Remove all unstable placement featuresAidan Hobson Sayers-1/+0
Closes #22181, #27779
2018-03-30Auto merge of #49424 - oli-obk:stable_allocid_hash, r=michaelwoeristerbors-12/+22
Fix stable hashing of AllocIds r? @michaelwoerister fixes #49081
2018-03-30Tweak `Clause` definition and HRTBsscalexm-5/+7
2018-03-29Auto merge of #49313 - sgrif:sg-revert-stuff, r=nikomatsakisbors-10/+0
Remove universes from `ty::ParamEnv` This change was never meant to land. #48407 takes an alternate approach. However, that PR is now blocked on some issues with canonicalization, and rebasing these reverts gets harder each time, so let's just get this bit out of the way now. r? @nikomatsakis
2018-03-28Fix stable hashing of AllocIdsOliver Schneider-12/+22
2018-03-28Push AllowTwoPhase down to the HAIR levelbobtwinkles-0/+4
For consistency, use AllowTwoPhase everywhere between the frontend and MIR.
2018-03-24Auto merge of #49251 - nikomatsakis:issue-15872-elision-impl-header, r=cramertjbors-0/+1
support elision in impl headers You can now do things like: ``` impl MyTrait<'_> for &u32 { ... } ``` Each `'_` or elided lifetime is a fresh parameter. `'_` and elision are still not permitted in associated type values. (Plausibly we could support that if there is a single input lifetime.) The original lifetime elision RFC was a bit unclear on this point: [as documented here, I think this is the correct interpretation, both because it fits existing impls and it's most analogous to the behavior in fns](https://github.com/rust-lang/rust/issues/15872#issuecomment-338700138). We do not support elision with deprecated forms: ``` impl MyTrait for std::cell::Ref<u32> { } // ERROR ``` Builds on the in-band lifetime stuff. r? @cramertj Fixes #15872
2018-03-24Auto merge of #48482 - davidtwco:issue-47184, r=nikomatsakisbors-0/+4
NLL should identify and respect the lifetime annotations that the user wrote Part of #47184. r? @nikomatsakis
2018-03-23Revert "introduce `UniverseIndex` into `ParamEnv`"Sean Griffin-10/+0
This reverts commit d4df52cacbee5d95e912a43188192a5054d36b4f.
2018-03-23Merge branch 'master' of https://github.com/Lymia/rust into rollupAlex Crichton-1/+4
2018-03-22UserAssertTy can handle inference variables.David Wood-2/+2
This commit modifies the UserAssertTy statement to take a canonicalized type rather than a regular type so that we can handle the case where the user provided type contains a inference variable.
2018-03-22Added UserAssertTy statement.David Wood-0/+4
2018-03-22permit `'_` and `&T` in impl headersNiko Matsakis-0/+1
Deprecated forms of elision are not supported.
2018-03-22rustc: Add a `#[wasm_import_module]` attributeAlex Crichton-1/+6
This commit adds a new attribute to the Rust compiler specific to the wasm target (and no other targets). The `#[wasm_import_module]` attribute is used to specify the module that a name is imported from, and is used like so: #[wasm_import_module = "./foo.js"] extern { fn some_js_function(); } Here the import of the symbol `some_js_function` is tagged with the `./foo.js` module in the wasm output file. Wasm-the-format includes two fields on all imports, a module and a field. The field is the symbol name (`some_js_function` above) and the module has historically unconditionally been `"env"`. I'm not sure if this `"env"` convention has asm.js or LLVM roots, but regardless we'd like the ability to configure it! The proposed ES module integration with wasm (aka a wasm module is "just another ES module") requires that the import module of wasm imports is interpreted as an ES module import, meaning that you'll need to encode paths, NPM packages, etc. As a result, we'll need this to be something other than `"env"`! Unfortunately neither our version of LLVM nor LLD supports custom import modules (aka anything not `"env"`). My hope is that by the time LLVM 7 is released both will have support, but in the meantime this commit adds some primitive encoding/decoding of wasm files to the compiler. This way rustc postprocesses the wasm module that LLVM emits to ensure it's got all the imports we'd like to have in it. Eventually I'd ideally like to unconditionally require this attribute to be placed on all `extern { ... }` blocks. For now though it seemed prudent to add it as an unstable attribute, so for now it's not required (as that'd force usage of a feature gate). Hopefully it doesn't take too long to "stabilize" this! cc rust-lang-nursery/rust-wasm#29
2018-03-21Now it compilesMrowqa-1/+2
2018-03-19Auto merge of #49091 - nikomatsakis:issue-49043-ty-infer-hash, ↵bors-2/+48
r=michaelwoerister extend stable hasher to support `CanonicalTy` Fixes #49043 r? @michaelwoerister
2018-03-18Initial implementation of RFC 2151, Raw IdentifiersLymia Aluysia-1/+4
2018-03-18Auto merge of #48985 - scalexm:lowering, r=nikomatsakisbors-0/+83
MVP for chalkification r? @nikomatsakis
2018-03-18Auto merge of #48917 - petrochenkov:import, r=oli-obkbors-1/+1
syntax: Make imports in AST closer to the source and cleanup their parsing This is a continuation of https://github.com/rust-lang/rust/pull/45846 in some sense.
2018-03-17AST/HIR: Clarify what the optional name in extern crate items meanVadim Petrochenkov-1/+1
2018-03-17syntax: Make `_` an identifierVadim Petrochenkov-1/+0
2018-03-17Auto merge of #48904 - Zoxc:code-and-file-maps, r=michaelwoeristerbors-15/+18
Make CodeMap and FileMap thread-safe r? @michaelwoerister
2018-03-16extend stable hasher to support `CanonicalTy`Niko Matsakis-2/+48
2018-03-15Make FileMap thread-safeJohn Kåre Alsaker-15/+18
2018-03-14Address niko's nitsscalexm-35/+35
2018-03-14Add MVP for chalkificationscalexm-0/+83
2018-03-14remove defaulting to unitAndrew Cann-2/+1
Types will no longer default to `()`, instead always defaulting to `!`. This disables the associated warning and removes the flag from TyTuple
2018-03-13introduce `infcx.at(..).dropck_outlives(..)` operaton [VIC]Niko Matsakis-6/+0
Backed by a canonicalized query. This computes all the types/regions that need to be live when the destructor runs (i.e., that the dtor may access).
2018-03-13add `canonicalize` method to `InferCtxt` [VIC]Niko Matsakis-2/+57
2018-03-09Move PROFQ_CHAN to a Session fieldJohn Kåre Alsaker-9/+25
2018-03-08Regenerate testsOliver Schneider-2/+2
2018-03-08Const eval will oom together with rustc nowOliver Schneider-9/+0
2018-03-08Const eval error refactoringOliver Schneider-0/+1
2018-03-08Add stack traces to miri errorsOliver Schneider-3/+11
2018-03-08Remove unused error variants and const eval typesOliver Schneider-16/+0
2018-03-08Use Mutability enum instead of boolOliver Schneider-1/+6
2018-03-08Prefer enum instead of magic numbersOliver Schneider-3/+14
2018-03-08Nuke ConstInt and Const*sizeOliver Schneider-27/+0
2018-03-08Wrap the miri ErrorKind in an Rc to reduce work in queriesOliver Schneider-2/+2
2018-03-08Hide the RefCell inside InterpretInternerOliver Schneider-6/+3
It was too easy to get this wrong
2018-03-08Add InterpretInterner to StableHashingContext for AllocId serializationOliver Schneider-251/+297
2018-03-08Prepare for using miri in transAlexander Regueiro-4/+6
2018-03-08Nuke the entire ctfe from orbit, it's the only way to be sureOliver Schneider-43/+0
2018-03-08Add miri errors to the const eval error enumOliver Schneider-0/+170