about summary refs log tree commit diff
path: root/src/librustc/middle
AgeCommit message (Collapse)AuthorLines
2018-08-05Convert unknown_features lint into an errorvarkor-4/+5
2018-08-05Turn the duplicate feature lint into an errorvarkor-25/+24
2018-08-05Fix test/compile-failvarkor-2/+9
2018-08-05Get around tidy bugvarkor-4/+4
2018-08-05Add duplicity lint for lang featuresvarkor-19/+30
2018-08-05Add a lint for duplicate feature attributesvarkor-0/+7
2018-08-05Trigger stable feature lint for lib featuresvarkor-0/+10
2018-08-05Add error for inconsistent stability `since` valuevarkor-0/+15
2018-08-05Add lint for unknown feature attributesvarkor-26/+184
2018-08-04Normalize EntryFnType variants to standard styleMark Rousskov-3/+4
2018-08-04Normalize variants of CrateType to standard styleMark Rousskov-19/+19
This is a clippy-breaking change.
2018-08-03Move unused trait functions to inherent functionsMark Rousskov-18/+0
2018-08-03Store concrete crate stores where possibleMark Rousskov-21/+1
2018-08-03Visibility is now a queryMark Rousskov-1/+0
2018-08-03Delete dummy crate storeMark Rousskov-63/+0
2018-08-03Move validate_crate_name to rustc_metadataMark Rousskov-27/+0
2018-07-31Move dataflow to borrowckMark Rousskov-686/+0
No one else uses it.
2018-07-30Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkovbors-6/+6
Don't format!() string literals Prefer `to_string()` to `format!()` take 2, this time targetting string literals. In some cases (`&format!("...")` -> `"..."`) also removes allocations. Occurences of `format!("")` are changed to `String::new()`.
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-6/+2
2018-07-28Don't format!() string literalsljedrz-6/+6
2018-07-28Auto merge of #52711 - eddyb:unsized-manuallydrop, r=nikomatsakisbors-0/+2
Change ManuallyDrop<T> to a lang item. This PR implements the approach @RalfJung proposes in https://internals.rust-lang.org/t/pre-rfc-unions-drop-types-and-manuallydrop/8025 (lang item `struct` instead of `union`). A followup PR can easily solve #47034 as well, by just adding a few `?Sized` to `libcore/mem.rs`. r? @nikomatsakis
2018-07-26Add flag indicating whether AST `borrowck` query signalled any error.Felix S. Klock II-0/+8
2018-07-25Change ManuallyDrop from an union to a struct and make it a lang item.Eduard-Mihai Burtescu-0/+2
2018-07-23Change single char str patterns to charsljedrz-1/+1
2018-07-22in which the elided-lifetimes-in-paths lint undergoes a revolutionZack M. Davis-16/+4
The existing elided-lifetimes-in-paths lint (introduced in Nov. 2017's accd997b5 / #46254) lacked stuctured suggestions and—much more alarmingly—produced false positives on associated functions (like `Ref::clone`) and on anonymous '_ lifetimes (!!—yes, the very anonymous lifetimes that we meant to suggest "instead"). That this went apparently unnoticed for so long maybe tells you something about how many people actually bother to flip on allow-by-default lints. After many hours of good old-fashioned American elbow grease—and a little help from expert reviewers—it turns out that getting the right answer is a lot easier if we fire the lint while lowering the Higher Intermediate Representation. The lint is promoted to the idioms-2018 group. Also, in the matter of test filenames, "elided" only has one 'l' (see, e.g., https://en.wiktionary.org/wiki/elide). Resolves #52041.
2018-07-21dead-code lint: say "constructed" for structsZack M. Davis-1/+5
This is a sequel to November 2017's #46103 / 1a9dc2e9. It had been reported (more than once—at least #19140, #44083, and #44565) that the "never used" language was confusing for enum variants that were "used" as match patterns, so the wording was changed to say never "constructed" specifically for enum variants. More recently, the same issue was raised for structs (#52325). It seems consistent to say "constructed" here, too, for the same reasons. We considered using more specific word "called" for unused functions and methods (while we declined to do this in #46103, the rationale given in the commit message doesn't actually make sense), but it turns out that Cargo's test suite expects the "never used" message, and maybe we don't care enough even to make a Cargo PR over such a petty and subjective wording change. This resolves #52325.
2018-07-21Auto merge of #52438 - ljedrz:rustc_vec_capacity, r=eddybbors-10/+6
Calculate Vec capacities in librustc Calculate the required capacity of a few vectors in rustc based on the number of elements they are populated with.
2018-07-20Refactor a few push loops to iterators in librustcljedrz-10/+6
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-17/+57
Implement existential types (not for associated types yet) r? @nikomatsakis cc @Centril @varkor @alexreg
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-17/+57
2018-07-16rustc: Use link_section, not wasm_custom_sectionAlex Crichton-5/+0
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-16Fix tidycsmoe-17/+44
2018-07-16ItemKindcsmoe-79/+79
2018-07-16ForeignItemKindcsmoe-3/+3
2018-07-16TyKindcsmoe-14/+14
2018-07-16ExprKindcsmoe-136/+136
2018-07-16VariantKindcsmoe-1/+1
2018-07-16DeclKindcsmoe-4/+4
2018-07-16StmtKindcsmoe-7/+7
2018-07-16BinOpKindcsmoe-2/+2
2018-07-15Auto merge of #52381 - oli-obk:ty_to_def_id, r=eddybbors-5/+1
Remove `ty_to_def_id` fixes https://github.com/rust-lang/rust/issues/52341 The uses were mostly convenience and generally "too powerful" (would also have worked for types that weren't interesting at the use site) r? @eddyb
2018-07-14Remove `ty_to_def_id`Oliver Schneider-5/+1
2018-07-14Remove most of `Hash` impls from AST and HIR structuresVadim Petrochenkov-1/+1
2018-07-13Auto merge of #51987 - nikomatsakis:nll-region-infer-scc, r=pnkfelixbors-1/+1
nll experiment: compute SCCs instead of iterative region solving This is an attempt to speed up region solving by replacing the current iterative dataflow with a SCC computation. The idea is to detect cycles (SCCs) amongst region constraints and then compute just one value per cycle. The graph with all cycles removed is of course a DAG, so we can then solve constraints "bottom up" once the liveness values are known. I kinda ran out of time this morning so the last commit is a bit sloppy but I wanted to get this posted, let travis run on it, and maybe do a perf run, before I clean it up.
2018-07-12rename `control_flow_graph` to `graph`Niko Matsakis-1/+1
2018-07-12rename `graph` to `control_flow_graph::implementation`Niko Matsakis-1/+1
2018-07-11Rollup merge of #52247 - ljedrz:dyn_librustc, r=oli-obkMark Rousskov-1/+1
Deny bare trait objects in in src/librustc Enforce `#![deny(bare_trait_objects)]` in `src/librustc`.
2018-07-11Deny bare trait objects in in src/librustcljedrz-1/+1