about summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2019-10-15Stabilize proc macros generating `macro_rules` itemsVadim Petrochenkov-1/+1
2019-10-14Rollup merge of #65398 - estebank:capitalization-only, r=varkorTyler Mandry-1/+2
Bring attention to suggestions when the only difference is capitalization CC #65386.
2019-10-14Rollup merge of #65260 - nnethercote:optimize-LexicalResolve-expansion, ↵Tyler Mandry-10/+16
r=nikomatsakis Optimize `LexicalResolve::expansion`. A win for `unicode_normalization`. r? @nikomatsakis
2019-10-14Rollup merge of #65170 - petrochenkov:cload, r=eddybTyler Mandry-4/+14
rustc_metadata: Privatize private code and remove dead code Also some minor cleanup and documentation improvements. r? @eddyb
2019-10-14Auto merge of #64987 - oli-obk:code_reuse_prevents_bugs, r=eddybbors-9/+7
Compute the layout of uninhabited structs fixes #64506 r? @eddyb
2019-10-14rustc_metadata: Remove resolutions for extern crate items from `CStore`Vadim Petrochenkov-4/+8
Use a more traditional scheme with providing them as a resolver output
2019-10-14rustc_metadata: Use `CrateSource` where appropriateVadim Petrochenkov-0/+6
2019-10-14Auto merge of #65399 - Centril:rollup-6lzj0w5, r=Centrilbors-190/+331
Rollup of 7 pull requests Successful merges: - #65215 (Add long error explanation for E0697) - #65292 (Print lifetimes with backticks) - #65362 (syntax: consolidate function parsing in item.rs) - #65363 (Remove implicit dependencies on syntax::pprust) - #65379 (refactor session::config::build_session_options_and_crate_config) - #65392 (Move `Nonterminal::to_tokenstream` to parser & don't rely directly on parser in lowering) - #65395 (Add some tests for fixed ICEs) Failed merges: r? @ghost
2019-10-14Rollup merge of #65392 - Centril:nt-to-tt, r=Mark-SimulacrumMazdak Farrokhzad-2/+12
Move `Nonterminal::to_tokenstream` to parser & don't rely directly on parser in lowering Split out from https://github.com/rust-lang/rust/pull/65324. r? @petrochenkov
2019-10-14Rollup merge of #65379 - Centril:refactor-bso_and_cc, r=petrochenkovMazdak Farrokhzad-183/+296
refactor session::config::build_session_options_and_crate_config I'm not exactly sure what happened in https://github.com/rust-lang/rust/pull/65361#issuecomment-541420179 so in an effort to bisect the error I'm extracting out the first commit so it can hopefully land (I suspect the error is in the 2nd-3rd commits.) r? @petrochenkov (I'll r=you when the PR builder is happy)
2019-10-14Rollup merge of #65363 - Centril:less-pprust, r=Mark-SimulacrumMazdak Farrokhzad-1/+2
Remove implicit dependencies on syntax::pprust Part of https://github.com/rust-lang/rust/pull/65324. The main goal here is to facilitate the eventual move of pprust out from libsyntax and because an AST definition typically should not depend on its pretty printer. r? @estebank
2019-10-14Rollup merge of #65292 - JohnTitor:add-backticks, r=varkor,CentrilMazdak Farrokhzad-3/+3
Print lifetimes with backticks Fixes #65287 r? @varkor
2019-10-14Rollup merge of #65215 - JohnTitor:long-explanation-e0697, r=GuillaumeGomezMazdak Farrokhzad-1/+18
Add long error explanation for E0697 Part of #61137 r? @GuillaumeGomez
2019-10-13Bring attention to suggestions when the only difference is capitalizationEsteban Küber-1/+2
2019-10-14Auto merge of #65240 - michaelwoerister:sp-review-3, r=Mark-Simulacrumbors-1/+1
self-profiling: Add events for metadata loading (plus a small dep-tracking optimization) This PR - adds self-profiling events related to loading things from crate metadata - makes the compiler cache the `DepNodeIndex` of upstream crates, so that they don't have to be looked up over and over. The commits are best reviewed in isolation. Self-profiling tracking issue: https://github.com/rust-lang/rust/issues/58967 r? @Mark-Simulacrum cc @wesleywiser
2019-10-13lowering: connect to parser via function pointer insteadMazdak Farrokhzad-10/+8
2019-10-13lowering: don't rely on parser directly.Mazdak Farrokhzad-6/+14
2019-10-13token: extract Nonterminal::to_tokenstream to parser.Mazdak Farrokhzad-1/+5
2019-10-13Rollup merge of #65369 - tmiasko:sanitizers-keep-names, r=varkorMazdak Farrokhzad-1/+9
Don't discard value names when using address or memory sanitizer The value names are used when reporting issues found by address sanitizer or memory sanitizer. Avoid discarding names when those sanitizers are enabled, unless explicitly requested to do otherwise.
2019-10-13Rollup merge of #65214 - Amanieu:cfg_atomic, r=alexcrichtonMazdak Farrokhzad-11/+14
Split non-CAS atomic support off into target_has_atomic_load_store This PR implements my proposed changes in https://github.com/rust-lang/rust/issues/32976#issuecomment-518542029 by removing `target_has_atomic = "cas"` and splitting `target_has_atomic` into two separate `cfg`s: * `target_has_atomic = 8/16/32/64/128`: This indicates the largest width that the target can atomically CAS (which implies support for all atomic operations). * ` target_has_atomic_load_store = 8/16/32/64/128`: This indicates the largest width that the target can support loading or storing atomically (but may not support CAS). cc #32976 r? @alexcrichton
2019-10-13refactor session::config::build_session_options_and_crate_configMazdak Farrokhzad-183/+296
2019-10-13Rollup merge of #65320 - memoryruins:const_err, r=oli-obkMazdak Farrokhzad-1/+2
Report `CONST_ERR` lint in external macros fixes #65300 fixes #61058 r? @oli-obk
2019-10-13Don't discard value names when using address or memory sanitizerTomasz Miąsko-1/+9
The value names are used when reporting issues found by address sanitizer or memory sanitizer. Avoid discarding names when those sanitizers are enabled, unless explicitly requested to do otherwise.
2019-10-13Auto merge of #65182 - anp:reify-shim, r=eddybbors-1/+43
Add `Instance::resolve_for_fn_ptr` (RFC 2091 #2/N) Supercedes: https://github.com/rust-lang/rust/pull/65082 Depends on: https://github.com/rust-lang/rust/pull/65037 Tracking issue: https://github.com/rust-lang/rust/issues/47809 [RFC text](https://github.com/rust-lang/rfcs/blob/master/text/2091-inline-semantic.md) steps taken: * [x] add a `ReifyShim` that is similar to `VirtualShim` in behavior (see #54183) * [x] add `ty::Instance::resolve_for_fn_ptr` (leave `ty::Instance::resolve_vtable` alone), migrate appropriate callers * [x] `resolve_for_fn_ptr` returns the shim if calling a `#[track_caller]` function
2019-10-13ast: remove implicit pprust dependency via Display.Mazdak Farrokhzad-1/+2
Instead just use `pprust::path_to_string(..)` where needed. This has two benefits: a) The AST definition is now independent of printing it. (Therefore we get closer to extracting a data-crate.) b) Debugging should be easier as program flow is clearer.
2019-10-13Apply suggestionYuki Okushi-5/+5
2019-10-11Rollup merge of #65283 - petrochenkov:softstab2, r=estebankTyler Mandry-3/+11
stability: Do not use `buffer_lint` after lowering to HIR Fixes https://github.com/rust-lang/rust/issues/65253
2019-10-11Rollup merge of #65277 - csmoe:fix-move, r=estebankTyler Mandry-0/+4
Query generator kind for error reporting Fixes https://github.com/rust-lang/rust/pull/65166#discussion_r333114545 r? @estebank cc @cramertj
2019-10-11Rollup merge of #65263 - mbStavola:dedup-raw-item-fns, r=CentrilTyler Mandry-21/+12
Deduplicate is_{freeze,copy,sized}_raw Fixes #65259 Deduplicates `is_{freeze,copy,sized}_raw` by delegating to a new method which takes in a `LangItem`.
2019-10-11Rollup merge of #65200 - xfix:patch-20, r=GuillaumeGomezTyler Mandry-5/+9
Add ?Sized bound to a supertrait listing in E0038 error documentation This example failed to compile because of implicit `Sized` bound for `A` parameter that wasn't required by `Trait`.
2019-10-11Rollup merge of #64986 - skinny121:fn-ptr-const-generics, r=varkorTyler Mandry-140/+153
Function pointers as const generic arguments Makes function pointers as const generic arguments usable. Fixes #62395 r? @varkor
2019-10-11Report lint in external macrosmemoryruins-1/+2
2019-10-11resolve_for_fn_ptr checks that the instance is an Item before returning shim.Adam Perry-10/+12
2019-10-11Auto merge of #64716 - jonhoo:stabilize-mem-take, r=SimonSapinbors-1/+0
Stabilize mem::take (mem_take) Tracking issue: https://github.com/rust-lang/rust/issues/61129 r? @matklad
2019-10-11Print lifetimes with backticksYuki Okushi-3/+3
2019-10-11Add long error explanation for E0697Yuki Okushi-1/+18
2019-10-10stability: Do not use `buffer_lint` after lowering to HIRVadim Petrochenkov-3/+11
2019-10-10query generator kind for error reportingcsmoe-0/+4
2019-10-10Auto merge of #59546 - sfanxiang:interminable-ub, r=nagisabors-0/+3
Add llvm.sideeffect to potential infinite loops and recursions LLVM assumes that a thread will eventually cause side effect. This is not true in Rust if a loop or recursion does nothing in its body, causing undefined behavior even in common cases like `loop {}`. Inserting llvm.sideeffect fixes the undefined behavior. As a micro-optimization, only insert llvm.sideeffect when jumping back in blocks or calling a function. A patch for LLVM is expected to allow empty non-terminate code by default and fix this issue from LLVM side. https://github.com/rust-lang/rust/issues/28728 **UPDATE:** [Mentoring instructions here](https://github.com/rust-lang/rust/pull/59546#issuecomment-515072429) to unstall this PR
2019-10-10Instance::resolve_for_fn_ptr unconditionally resolves first.Adam Perry-9/+13
Per review feedback.
2019-10-10Improve docs for InstanceDef::ReifyShim.Adam Perry-1/+4
2019-10-10Preserve output of raw pointers in mir dump.ben-1/+8
2019-10-09Qualify LangItemMatt Stavola-1/+1
2019-10-09Delegate is_{freeze,copy,sized}_raw to is_item_rawMatt Stavola-21/+12
2019-10-10Remove `tag` from `iterate_until_fixed_point()`.Nicholas Nethercote-4/+4
The function only has one call site, so we don't need a tag argument.
2019-10-10Special-case `ReEmpty` in `expand_node()`.Nicholas Nethercote-1/+9
This wins 6% on `unicode_normalization`, by avoiding a call to `lub_concrete_regions()` and a `Region` equality test.
2019-10-10Tweak `tcx` usage in `lub_concrete_regions()`.Nicholas Nethercote-5/+3
Some places use the local `tcx` variable, some use `self.tcx()`. This commit removes the local variable so that all places use `self.tcx()`, for consistency.
2019-10-10Auto merge of #65077 - estebank:mut-trait-expected, r=nikomatsakisbors-22/+107
Note when a mutable trait object is needed Fix https://github.com/rust-lang/rust/issues/63619, fix https://github.com/rust-lang/rust/issues/37914. CC https://github.com/rust-lang/rust/issues/64068.
2019-10-09Clarify comment, dedupe match arms in shim.rs.Adam Perry-1/+3
Also add a missing terminal newline to a test.
2019-10-09Return ReifyShim from Instance::resolve_for_fn_ptr when track_caller present.Adam Perry-2/+2
This ICEs in MIR currently, which I think is to be expected since none of the MIR plumbing is set up. I added a test which confirms that the shim is being used for reifying a track_caller function.