about summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2020-03-15rustc: tweak comments on InstanceDef.Ana-Maria Mihalache-12/+9
2020-03-15rustc: don't resolve Instances which would produce malformed shims.Eduard-Mihai Burtescu-0/+15
2020-03-15Auto merge of #68944 - Zoxc:hir-map, r=eddybbors-698/+462
Use queries for the HIR map r? @eddyb cc @michaelwoerister
2020-03-15Avoid ICEs when we emit errors constructing the specialization graphMatthew Jasper-11/+21
2020-03-15Add attributes to allow specializing on traitsMatthew Jasper-1/+32
2020-03-14Add some comments to the new queriesJohn Kåre Alsaker-0/+13
2020-03-14Don't try to print missing HIR idsJohn Kåre Alsaker-2/+2
2020-03-14Reintroduce workaround for #62649John Kåre Alsaker-8/+15
2020-03-14Create the `hir_to_node_id` map before `TyCtxt`John Kåre Alsaker-31/+25
2020-03-14Optimize the HIR mapJohn Kåre Alsaker-46/+49
2020-03-14Don't hash HIR with bodies thriceJohn Kåre Alsaker-37/+43
2020-03-14Fix HIR map validationJohn Kåre Alsaker-12/+14
2020-03-14Index HIR after creating TyCtxtJohn Kåre Alsaker-154/+60
2020-03-14Only hash the Hir owner (including its bodies)John Kåre Alsaker-4/+36
2020-03-14Remove `input_task`John Kåre Alsaker-22/+0
2020-03-14Remove `Hir` and `HirBody` dep nodesJohn Kåre Alsaker-12/+3
2020-03-14Clean up the collectorJohn Kåre Alsaker-138/+32
2020-03-14Remove `AllLocalTraitImpls`John Kåre Alsaker-12/+1
2020-03-14Remove the `map` field from `Map`John Kåre Alsaker-27/+0
2020-03-14Update `trait_impls`John Kåre Alsaker-10/+23
2020-03-14Remove commentsJohn Kåre Alsaker-3/+0
2020-03-14Update `find_entry`John Kåre Alsaker-1/+1
2020-03-14Update `is_hir_id_module`John Kåre Alsaker-3/+3
2020-03-14Update `find`John Kåre Alsaker-7/+2
2020-03-14Update `get_parent_node`John Kåre Alsaker-9/+2
2020-03-14Update `visit_item_likes_in_module`John Kåre Alsaker-60/+26
2020-03-14Update `krate_attrs` and `get_module`John Kåre Alsaker-25/+35
2020-03-14Update `body_owner` and `maybe_body_owned_by`John Kåre Alsaker-39/+31
2020-03-14Update `fn_decl_by_hir_id` and `fn_sig_by_hir_id`John Kåre Alsaker-42/+44
2020-03-14Update item functionsJohn Kåre Alsaker-15/+12
2020-03-14Create Map after TyCtxtJohn Kåre Alsaker-157/+130
2020-03-14Collect the new mapsJohn Kåre Alsaker-8/+66
2020-03-14Add HIR queriesJohn Kåre Alsaker-62/+42
2020-03-14Auto merge of #69999 - RalfJung:miri-unwind, r=oli-obkbors-0/+26
adjust Miri to needs of changed unwinding strategy As expected, https://github.com/rust-lang/rust/pull/67502 broke unwinding in Miri. To fix it we have to adjust parts of the engine and the panic runtime, which this PR does. The Miri-side changes are in https://github.com/rust-lang/miri/pull/1227. Cc @oli-obk @Aaron1011 @Mark-Simulacrum @Amanieu
2020-03-14Move IntercrateAmbiguityCause back to rustc::traits::select.Camille GILLOT-0/+41
2020-03-14Use smaller discriminants for generatorsJonas Schievink-6/+9
2020-03-14add Scalar::from methods for signed integersRalf Jung-0/+26
2020-03-13Auto merge of #67502 - Mark-Simulacrum:opt-catch, r=Mark-Simulacrumbors-2/+1
Optimize catch_unwind to match C++ try/catch This refactors the implementation of catching unwinds to allow LLVM to inline the "try" closure directly into the happy path, avoiding indirection. This means that the catch_unwind implementation is (after this PR) zero-cost unless a panic is thrown. https://rust.godbolt.org/z/cZcUSB is an example of the current codegen in a simple case. Notably, the codegen is *exactly the same* if `-Cpanic=abort` is passed, which is clearly not great. This PR, on the other hand, generates the following assembly: ```asm # -Cpanic=unwind: push rbx mov ebx,0x2a call QWORD PTR [rip+0x1c53c] # <happy> mov eax,ebx pop rbx ret mov rdi,rax call QWORD PTR [rip+0x1c537] # cleanup function call call QWORD PTR [rip+0x1c539] # <unfortunate> mov ebx,0xd mov eax,ebx pop rbx ret # -Cpanic=abort: push rax call QWORD PTR [rip+0x20a1] # <happy> mov eax,0x2a pop rcx ret ``` Fixes #64224, and resolves #64222.
2020-03-14Rollup merge of #69809 - matthiaskrgr:lifetimes, r=eddybYuki Okushi-5/+5
remove lifetimes that can be elided (clippy::needless_lifetimes)
2020-03-14Rollup merge of #69802 - matthiaskrgr:cl1ppy, r=Dylan-DPCYuki Okushi-7/+2
fix more clippy findings * reduce references on match patterns (clippy::match_ref_pats) * Use writeln!(fmt, "word") instead of write!(fmt, "word\n") (clippy::write_with_newline) * libtest: remove redundant argument to writeln!() (clippy::writeln_empty_string) * remove unneeded mutable references (cippy::unnecessary_mut_passed) * libtest: declare variables as floats instead of casting them (clippy::unnecessary_cast) * rustdoc: remove redundant static lifetimes (clippy::redundant_static_lifetimes) * call .as_deref() instead of .as_ref().map(Deref::deref) (clippy::option_as_ref_deref) * iterate over a maps values directly. (clippy::for_kv_map) * rustdoc: simplify boolean condition (clippy::nonminimal_bool) * Use ?-operator in more places (clippy::question_mark, had some false negatives fixed recently) * rustdoc: Use .any(p) instead of find(p).is_some(). (clippy::search_is_some) * rustdoc: don't call into_iter() on iterator. (clippy::identity_conversion)
2020-03-13Print ConstKind::Placeholder just like TyKind::PlaceholderOliver Scherer-15/+1
2020-03-13Print ConstKind::Bound the same as TyKind::BoundOliver Scherer-9/+17
2020-03-12remove lifetimes that can be elided (clippy::needless_lifetimes)Matthias Krüger-5/+5
2020-03-12Ensure HAS_FREE_LOCAL_NAMES is set for ReFreeMatthew Jasper-26/+29
2020-03-12Rollup merge of #69747 - spastorino:rename-rustc-guide, r=pietroalbiniMazdak Farrokhzad-25/+25
Rename rustc guide This is in preparation for https://github.com/rust-lang/rustc-guide/issues/470 Needs to be merged after we actually rename the guide. Have used this to rename: `git grep -l 'rustc_guide' | xargs sed -i 's/rustc_guide/rustc_dev_guide/g'` `git grep -l 'rustc-guide' | xargs sed -i 's/rustc-guide/rustc-dev-guide/g'` `git grep -l 'rustc guide' | xargs sed -i 's/rustc guide/rustc dev guide/g'`
2020-03-12Rollup merge of #69674 - mark-i-m:assoc-fn, r=matthewjasperMazdak Farrokhzad-15/+15
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc #69498 #60163
2020-03-12Remove fn special casing in const printingOliver Scherer-11/+26
2020-03-12Comment nitOliver Scherer-1/+1
2020-03-12codegen/mir: support polymorphic `InstanceDef`sDavid Wood-0/+26
This commit modifies the use of `subst_and_normalize_erasing_regions` on parts of the MIR bodies returned from `instance_mir`, so that `InstanceDef::CloneShim` and `InstanceDef::DropGlue` (where there is a type) do not perform substitutions. This avoids double substitutions and enables polymorphic `InstanceDef`s. Signed-off-by: David Wood <david@davidtw.co>
2020-03-11fmtRalf Jung-1/+1