about summary refs log tree commit diff
path: root/src/librustc/ich
AgeCommit message (Collapse)AuthorLines
2018-08-22Allow panicking with string literal messages inside constantsOliver Schneider-1/+6
2018-08-22Replace TyForeign with ForeignTyvarkor-1/+1
2018-08-22Rename Def::{Param, Foreign} to Def::{TyParam, TyForeign}varkor-2/+2
2018-08-22Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str}varkor-12/+12
2018-08-22Remove Ty prefix from Ty{Foreign|Param}varkor-4/+4
2018-08-22Remove Ty prefix from ↵varkor-17/+17
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-22Rename ty::TyVariants to ty::TyKindvarkor-5/+5
2018-08-22Rename ty::Slice to ty::Listvarkor-2/+2
2018-08-22miri/CTFE refactorRalf Jung-6/+0
* Value gets renamed to Operand, so that now interpret::{Place, Operand} are the "dynamic" versions of mir::{Place, Operand}. * Operand and Place share the data for their "stuff is in memory"-base in a new type, MemPlace. This also makes it possible to give some more precise types in other areas. Both Operand and MemPlace have methods available to project into fields (and other kinds of projections) without causing further allocations. * The type for "a Scalar or a ScalarPair" is called Value, and again used to give some more precise types. * All of these have versions with an attached layout, so that we can more often drag the layout along instead of recomputing it. This lets us get rid of `PlaceExtra::Downcast`. MPlaceTy and PlaceTy can only be constructed in place.rs, making sure the layout is handled properly. (The same should eventually be done for ValTy and OpTy.) * All the high-level functions to write typed memory take a Place, and live in place.rs. All the high-level typed functions to read typed memory take an Operand, and live in operands.rs.
2018-08-21New AccessLevel and accompanying propagation.Kyle Simpson-0/+1
2018-08-19Rename `Catch` variants to `TryBlock`Scott McMurray-1/+1
(Not `Try` since `QuestionMark` is using that.)
2018-08-19mv CachingCodemapView CachingSourceMapViewDonato Sciarra-10/+10
2018-08-19mv codemap source_mapDonato Sciarra-13/+13
2018-08-19mv codemap() source_map()Donato Sciarra-3/+3
2018-08-19mv (mod) codemap source_mapDonato Sciarra-2/+2
2018-08-19mv filemap source_fileDonato Sciarra-9/+9
2018-08-19mv FileMap SourceFileDonato Sciarra-7/+7
2018-08-19mv CodeMap SourceMapDonato Sciarra-7/+7
2018-08-09Cache ignored attributes inside ICH entirelyMark Rousskov-3/+6
2018-08-09Move Fingerprint to data structuresMark Rousskov-113/+1
2018-08-09Reuse Hash impls for session data structuresMark Rousskov-8/+1
2018-08-08Auto merge of #53053 - petrochenkov:custattr, r=alexcrichtonbors-1/+8
resolve: Support custom attributes when macro modularization is enabled Basically, if resolution of a single-segment attribute is a determined error, then we interpret it as a custom attribute. Since custom attributes are integrated into general macro resolution, `feature(custom_attribute)` now requires and implicitly enables macro modularization (`feature(use_extern_macros)`). Actually, a few other "advanced" macro features now implicitly enable macro modularization too (and one bug was found and fixed in process of enabling it). The first two commits are preliminary cleanups/refactorings.
2018-08-07Add HirId to VisibilityKind::RestrictedMark Rousskov-1/+3
2018-08-07Rollup merge of #52886 - petrochenkov:noga, r=alexcrichtonkennytm-1/+0
cleanup: Remove `Def::GlobalAsm` Global asm is not something that needs to have a `Def` or `DefId`.
2018-08-06Discern between various kinds of non-macro attributesVadim Petrochenkov-1/+8
2018-08-05Add duplicity lint for lang featuresvarkor-1/+1
2018-08-05Add lint for unknown feature attributesvarkor-0/+5
2018-08-04cleanup: Remove `Def::GlobalAsm`Vadim Petrochenkov-1/+0
2018-08-03Auto merge of #52712 - oli-obk:const_eval_cleanups, r=RalfJungbors-2/+7
Reintroduce `Undef` and properly check constant value sizes r? @RalfJung cc @eddyb basically all kinds of silent failures that never occurred are assertions now
2018-08-02Auto merge of #52841 - petrochenkov:premacro, r=alexcrichtonbors-0/+2
resolve: Implement prelude search for macro paths, implement tool attributes When identifier is macro path is resolved in scopes (i.e. the first path segment - `foo` in `foo::mac!()` or `foo!()`), scopes are searched in the same order as for non-macro paths - items in modules, extern prelude, tool prelude (see later), standard library prelude, language prelude, but with some extra shadowing restrictions (names from globs and macro expansions cannot shadow names from outer scopes). See the comment in `fn resolve_lexical_macro_path_segment` for more details. "Tool prelude" currently contains two "tool modules" `rustfmt` and `clippy`, and is searched immediately after extern prelude. This makes the [possible long-term solution](https://github.com/rust-lang/rfcs/blob/master/text/2103-tool-attributes.md#long-term-solution) for tool attributes exactly equivalent to the existing extern prelude scheme, except that `--extern=my_crate` making crate names available in scope is replaced with something like `--tool=my_tool` making tool names available in scope. The `tool_attributes` feature is still unstable and `#![feature(tool_attributes)]` now implicitly enables `#![feature(use_extern_macros)]`. `use_extern_macros` is a prerequisite for `tool_attributes`, so their stabilization will happen in the same order. If `use_extern_macros` is not enabled, then tool attributes are treated as custom attributes (this is temporary, anyway). Fixes https://github.com/rust-lang/rust/issues/52576 Fixes https://github.com/rust-lang/rust/issues/52512 Fixes https://github.com/rust-lang/rust/issues/51277 cc https://github.com/rust-lang/rust/issues/52269
2018-08-01Switch to bootstrapping from 1.29 betaMark Rousskov-1/+0
2018-08-01Reintroduce `Undef` and properly check constant value sizesOliver Schneider-2/+7
2018-08-01resolve: Implement prelude search for macro pathsVadim Petrochenkov-0/+2
resolve/expansion: Implement tool attributes
2018-07-28Auto merge of #52355 - pietroalbini:zfeature, r=eddybbors-0/+1
Add the -Zcrate-attr=foo unstable rustc option This PR adds a new unstable option to `rustc`: `-Zcrate-attr=foo`. The option can be used to inject crate-level attributes from the CLI, and it's meant to be used by tools like Crater that needs to add their own attributes to a crate without changing the source code. The exact reason I need this is to implement "edition runs" in Crater: we need to add the preview feature flag to every crate, and editing the crates' source code on the fly might produce unexpected results, while a compiler flag is more reliable. cc https://github.com/rust-lang-nursery/crater/issues/282 @Mark-Simulacrum
2018-07-27Add the -Zcrate-attr=foo nightly rustc flag to inject crate attributesPietro Albini-0/+1
2018-07-27Use slices where a vector is not necessaryljedrz-1/+1
2018-07-23Promoteds are statics and statics have a place, not just a valueOliver Schneider-16/+3
2018-07-20Auto merge of #52445 - alexcrichton:wasm-import-module, r=eddybbors-1/+2
rustc: Stabilize #[wasm_import_module] as #[link(...)] This commit stabilizes the `#[wasm_import_module]` attribute as `#[link(wasm_import_module = "...")]`. Tracked by #52090 this new directive in the `#[link]` attribute is used to configured the module name that the imports are listed with. The WebAssembly specification indicates two utf-8 names are associated with all imported items, one for the module the item comes from and one for the item itself. The item itself is configurable in Rust via its identifier or `#[link_name = "..."]`, but the module name was previously not configurable and defaulted to `"env"`. This commit ensures that this is also configurable. Closes #52090
2018-07-19Auto merge of #52024 - oli-obk:existential_parse, r=nikomatsakisbors-0/+4
Implement existential types (not for associated types yet) r? @nikomatsakis cc @Centril @varkor @alexreg
2018-07-18Do not use desugared ident when suggesting adding a typeEsteban Küber-0/+1
2018-07-18rustc: Stabilize #[wasm_import_module] as #[link(...)]Alex Crichton-1/+2
This commit stabilizes the `#[wasm_import_module]` attribute as `#[link(wasm_import_module = "...")]`. Tracked by #52090 this new directive in the `#[link]` attribute is used to configured the module name that the imports are listed with. The WebAssembly specification indicates two utf-8 names are associated with all imported items, one for the module the item comes from and one for the item itself. The item itself is configurable in Rust via its identifier or `#[link_name = "..."]`, but the module name was previously not configurable and defaulted to `"env"`. This commit ensures that this is also configurable. Closes #52090
2018-07-18Implement existential typesOliver Schneider-0/+4
2018-07-16rustc: Use link_section, not wasm_custom_sectionAlex Crichton-1/+1
This commit transitions definitions of custom sections on the wasm target from the unstable `#[wasm_custom_section]` attribute to the already-stable-for-other-targets `#[link_section]` attribute. Mostly the same restrictions apply as before, except that this now applies only to statics. Closes #51088
2018-07-16ItemKindcsmoe-17/+17
2018-07-16ForeignItemKindcsmoe-4/+4
2018-07-16TyKindcsmoe-13/+13
2018-07-16ExprKindcsmoe-30/+30
2018-07-16VariantKindcsmoe-2/+2
2018-07-16DeclKindcsmoe-4/+4
2018-07-16StmtKindcsmoe-5/+5