about summary refs log tree commit diff
path: root/src/librustc_front
AgeCommit message (Collapse)AuthorLines
2015-12-22Stop re-exporting PathParameters's variants.Ms2ger-2/+2
2015-12-21Auto merge of #30352 - alexcrichton:new-snashots, r=nikomatsakisbors-3/+0
Lots of cruft to remove!
2015-12-21Auto merge of #30460 - Ms2ger:BindingMode, r=alexcrichtonbors-2/+2
2015-12-21Register new snapshotsAlex Crichton-3/+0
Lots of cruft to remove!
2015-12-20Auto merge of #30470 - petrochenkov:owned5, r=nrcbors-22/+22
cc https://github.com/rust-lang/rust/pull/30095 r? @nrc
2015-12-20Stop re-exporting the ast::BindingMode variants.Ms2ger-2/+2
2015-12-19Auto merge of #30184 - petrochenkov:ascr, r=nikomatsakisbors-2/+16
This PR is a rebase of the original PR by @eddyb https://github.com/rust-lang/rust/pull/21836 with some unrebasable parts manually reapplied, feature gate added + type equality restriction added as described below. This implementation is partial because the type equality restriction is applied to all type ascription expressions and not only those in lvalue contexts. Thus, all difficulties with detection of these contexts and translation of coercions having effect in runtime are avoided. So, you can't write things with coercions like `let slice = &[1, 2, 3]: &[u8];`. It obviously makes type ascription less useful than it should be, but it's still much more useful than not having type ascription at all. In particular, things like `let v = something.iter().collect(): Vec<_>;` and `let u = t.into(): U;` work as expected and I'm pretty happy with these improvements alone. Part of https://github.com/rust-lang/rust/issues/23416
2015-12-19Improve OwnedSlice and use it in HIRVadim Petrochenkov-22/+22
2015-12-18Auto merge of #30374 - durka:issue-30371, r=alexcrichtonbors-2/+3
Fixes #30371.
2015-12-18Rollup merge of #30420 - petrochenkov:owned2, r=nrcManish Goregaokar-163/+183
Part of https://github.com/rust-lang/rust/pull/30095 not causing mysterious segfaults. r? @nrc
2015-12-18Abstract away differences between Vec and ptr::P in HIRVadim Petrochenkov-132/+157
2015-12-18Deprecate name `OwnedSlice` and don't use itVadim Petrochenkov-31/+26
2015-12-17move error handling from libsyntax/diagnostics.rs to libsyntax/errors/*Nick Cameron-3/+3
Also split out emitters into their own module.
2015-12-16Add ExprType to HIR and make everything compileVadim Petrochenkov-2/+16
+ Apply parser changes manually + Add feature gate
2015-12-14evade unused_variables lint in for-loop desugaringAlex Burka-2/+3
2015-12-14Auto merge of #29735 - Amanieu:asm_indirect_constraint, r=pnkfelixbors-11/+31
This PR reverts #29543 and instead implements proper support for "=*m" and "+*m" indirect output operands. This provides a framework on top of which support for plain memory operands ("m", "=m" and "+m") can be implemented. This also fixes the liveness analysis pass not handling read/write operands correctly.
2015-12-10adjust documentation to mention `intravisit` instead of `visit`Oliver Schneider-2/+2
2015-12-09Auto merge of #30145 - petrochenkov:hyg, r=nrcbors-35/+128
Instead of `ast::Ident`, bindings, paths and labels in HIR now keep a new structure called `hir::Ident` containing mtwt-renamed `name` and the original not-renamed `unhygienic_name`. `name` is supposed to be used by default, `unhygienic_name` is rarely used. This is not ideal, but better than the status quo for two reasons: - MTWT tables can be cleared immediately after lowering to HIR - This is less bug-prone, because it is impossible now to forget applying `mtwt::resolve` to a name. It is still possible to use `name` instead of `unhygienic_name` by mistake, but `unhygienic_name`s are used only in few very special circumstances, so it shouldn't be a problem. Besides name resolution `unhygienic_name` is used in some lints and debuginfo. `unhygienic_name` can be very well approximated by "reverse renaming" `token::intern(name.as_str())` or even plain string `name.as_str()`, except that it would break gensyms like `iter` in desugared `for` loops. This approximation is likely good enough for lints and debuginfo, but not for name resolution, unfortunately (see https://github.com/rust-lang/rust/issues/27639), so `unhygienic_name` has to be kept. cc https://github.com/rust-lang/rust/issues/29782 r? @nrc
2015-12-07Add comments for Ident::from_name and identifiers in path segmentsVadim Petrochenkov-0/+14
2015-12-07Remove some unnecessary indirection from HIR structuresVadim Petrochenkov-150/+137
2015-12-05Use a struct instead of a tuple for inline asm output operandsAmanieu d'Antras-12/+30
2015-12-05Add proper support for indirect output constraints in inline asmAmanieu d'Antras-6/+8
2015-12-05Do MTWT resolution during lowering to HIRVadim Petrochenkov-35/+114
2015-11-26Rebase fixup for lower.rsMarvin Löbel-37/+55
2015-11-26Some TLC for the MoveMap traitMarvin Löbel-38/+7
2015-11-26Moved and refactored ThinAttributesMarvin Löbel-6/+7
2015-11-26Add syntax support for attributes on expressions and all syntaxMarvin Löbel-24/+52
nodes in statement position. Extended #[cfg] folder to allow removal of statements, and of expressions in optional positions like expression lists and trailing block expressions. Extended lint checker to recognize lint levels on expressions and locals.
2015-11-25Remove all uses of `#[staged_api]`Vadim Petrochenkov-1/+1
2015-11-18Fix two long lines.Niko Matsakis-2/+6
2015-11-18Remove rustc_data_structures from the deps of librustc_front nowNiko Matsakis-1/+0
that we no longer use FnvHashMap
2015-11-18Change to a BTreeMap rather than sorting the keys of a FnvHashMap.Niko Matsakis-15/+13
2015-11-18Add comment explaining why it is called `intravisit`Niko Matsakis-10/+14
2015-11-18Refactor the HIR so that items are stored in a map in the `Crate`,Niko Matsakis-111/+228
rather being stored inline. Refactor (and rename) the visitor so that (by default) it only visits the interior content of an item not nested items. This is a [breaking-change] for anyone who uses the HIR visitor. Besides changing `visit::` to `intravisit::`, you need to refactor your visitor in one of two ways, depending on what it requires: 1. If you just want to visit all items (most common), you should call `krate.visit_all_items(&mut visitor)`. 2. If you need to visit nested items in the middle of the parent items, you should override `visit_nested_item` with something like: `self.visit_item(self.tcx.map.expect_item(item.id))`, presuming you have access to a tcx (or at least a HIR map).
2015-11-18refactorings of `lowering` that make it more amenable to using `&mut`Niko Matsakis-290/+295
instead of `Cell` (but stop short of actualling switching to `&mut`)
2015-11-18rename `_lctx` to `lctx` where appropriateNiko Matsakis-209/+210
2015-11-17Auto merge of #29766 - oli-obk:impl_item, r=nikomatsakisbors-23/+22
[breaking change] I'm not sure if those renames are ok. [TokenType::Tt* to TokenType::*](https://github.com/rust-lang/rust/pull/29582) was obvious, but for all those Item-enums it's less obvious to me what the right way forward is due to the underscore.
2015-11-16Remove `TyParen` from HIRVadim Petrochenkov-10/+4
2015-11-16rename `ast::ImplItem_::*ImplItem` to `ast::ImplItemKind::*`Oliver Schneider-4/+4
2015-11-16ImplItem_ -> ImplItemKind renameOliver Schneider-16/+16
2015-11-16rename ImplItem_::*ImplItem to ImplItem_::*Oliver Schneider-18/+17
[breaking change]
2015-11-13simplify HIR folder so that it only maps 1 item to 1 item,Niko Matsakis-124/+89
removing a bunch of asserts
2015-11-09Rustfmting librustc_front (again).Jose Narvaez-196/+192
2015-11-02Auto merge of #29291 - petrochenkov:privacy, r=alexcrichtonbors-0/+6
The public set is expanded with trait items, impls and their items, foreign items, exported macros, variant fields, i.e. all the missing parts. Now it's a subset of the exported set. This is needed for https://github.com/rust-lang/rust/pull/29083 because stability annotation pass uses the public set and all things listed above need to be annotated. Rustdoc can now be migrated to the public set as well, I guess. Exported set is now slightly more correct with regard to exported items in blocks - 1) blocks in foreign items are considered and 2) publicity is not inherited from the block's parent - if a function is public it doesn't mean structures defined in its body are public. r? @alexcrichton or maybe someone else
2015-11-01Auto merge of #29501 - Manishearth:pat-docs, r=alexcrichtonbors-3/+3
None
2015-11-01Add code formatting on PatVec docsManish Goregaokar-2/+2
2015-11-01Fix PatEnum docsManish Goregaokar-1/+1
2015-10-31Remove PatWildMultiVadim Petrochenkov-32/+11
2015-10-25syntax/rustc_front: Simplify VariantData::fieldsVadim Petrochenkov-32/+24
And use VariantData instead of P<VariantData> in Item_ and Variant_
2015-10-25rustc_privacy: Expand public node set, build exported node set more correctlyVadim Petrochenkov-0/+6
2015-10-17Auto merge of #29102 - petrochenkov:spanvis, r=alexcrichtonbors-5/+3
Closes https://github.com/rust-lang/rust/issues/28750 `Arm` and `Generics` don't have spans at all, so it's not a visitor's problem, `visit_struct_def` was fixed in https://github.com/rust-lang/rust/pull/28816