about summary refs log tree commit diff
path: root/src/librustc_mir
AgeCommit message (Collapse)AuthorLines
2020-02-04Don't emit StorageDead for the resume argumentJonas Schievink-4/+0
2020-02-04Auto merge of #68804 - ecstatic-morse:qualif-cursor-lazy, r=estebankbors-53/+36
Always use lazy qualif getters during const-checking `has_mut_interior_eager_seek` was needed to work around an overly restrictive bound on the `per_local` argument to the `Qualif` trait. This PR makes that bound `FnMut` instead of `Fn` so we can seek cursors inside of it, resolving a FIXME in the const-checking code.
2020-02-03Tweak borrow error on `FnMut` when `Fn` is expectedEsteban Küber-6/+96
2020-02-03Suggest `split_at_mut` on multiple mutable index accessEsteban Küber-2/+25
2020-02-03Treat `Rvalue::AddressOf` the same as `Rvalue::Ref`Dylan MacKenzie-18/+11
2020-02-03Eliminate "eager" qualif getterDylan MacKenzie-22/+6
All qualif getters are now lazy
2020-02-03Pass correct closure type to `Qualif` methodsDylan MacKenzie-5/+11
2020-02-03Take `FnMut` instead of `Fn` in `Qualif` methodsDylan MacKenzie-10/+10
2020-02-03Fix miscompilationJonas Schievink-10/+53
2020-02-02Account for `?Sized` type parameter boundsEsteban Küber-0/+2
2020-02-02Remove duplicated codeEsteban Küber-1/+1
2020-02-02No resume argument in the drop shimJonas Schievink-18/+33
2020-02-02Make generator transform move resume arg aroundJonas Schievink-7/+19
The resume arg is passed as argument `_2` and needs to be moved to the `Yield`s target `Place`
2020-02-02Add resume arg place to `Yield` MIR terminatorJonas Schievink-4/+12
2020-02-02Add a resume type parameter to `Generator`Jonas Schievink-9/+14
2020-02-02Rollup merge of #68460 - sinkuu:emit_mir_buffered, r=Mark-SimulacrumYuki Okushi-10/+31
Use BufWriter for emitting MIR I noticed that `--emit=mir` takes long time on a large crate. https://github.com/rust-lang/rust/pull/64344 seem to have fixed `-Zdump-mir`, but not `--emit=mir`.
2020-02-01syntax::print -> new crate rustc_ast_prettyMazdak Farrokhzad-1/+2
2020-02-011. move allow_internal_unstable to rustc_attrMazdak Farrokhzad-1/+2
2. as a result, drop rustc_errors dep from syntax
2020-02-01Move builtin attribute logic to new rustc_attr crate.Mazdak Farrokhzad-2/+3
For now, this is all the crate contains, but more attribute logic & types will be moved there over time.
2020-02-01Use BufWriterShotaro Yamada-10/+31
2020-01-31Drop cfg(bootstrap) codeMark Rousskov-1/+0
2020-01-31Auto merge of #68080 - varkor:declared-here, r=petrochenkovbors-3/+3
Address inconsistency in using "is" with "declared here" "is" was generally used for NLL diagnostics, but not other diagnostics. Using "is" makes the diagnostics sound more natural and readable, so it seems sensible to commit to them throughout. r? @Centril
2020-01-31Auto merge of #68685 - Dylan-DPC:rollup-rkbo05z, r=Dylan-DPCbors-39/+18
Rollup of 6 pull requests Successful merges: - #68588 (check_unsafety: more code reuse) - #68638 (Add missing links for cmp traits) - #68660 (Fix typo.) - #68669 (suggest adding space in accidental doc comments) - #68670 (clarify "incorrect issue" error) - #68680 (Add `#![doc(html_playground_url = ...)]` to alloc crate) Failed merges: r? @ghost
2020-01-31Rollup merge of #68588 - Centril:check-unsafety-clean, r=Mark-SimulacrumDylan DPC-39/+18
check_unsafety: more code reuse r? oli-obk
2020-01-31Auto merge of #67878 - Others:opt-3, r=Mark-Simulacrumbors-0/+3
Change opt-level from 2 back to 3 In Cargo.toml, the opt-level for `release` and `bench` was overridden to be 2. This was to work around a problem with LLVM 7. However, rust no longer uses LLVM 7, so this is hopefully no longer needed? I tried a little bit to replicate the original problem, and could not. I think running this through CI is the best way to smoke test this :) Even if things break dramatically, the comment should be updated to reflect that things are still broken with LLVM 9. I'm just getting started playing with the compiler, so apologies if I've missed an obvious problem here. fixes #52378 (possibly relevant is the [current update to LLVM 10](https://github.com/rust-lang/rust/pull/67759))
2020-01-30Change opt-level from 2 back to 3Gregor Peach-0/+3
In Cargo.toml, the opt-level for `release` and `bench` was overridden to be 2. This was to work around a problem with LLVM 7. However, rust no longer uses LLVM 7, so this is no longer needed. This creates a small compile time regression in MIR constant eval, so I've added a #[inline(always)] on the `step` function used in const eval Also creates a binary size increase in wasm-stringify-ints-small, so I've bumped the limit there.
2020-01-28Fix some wrong dereferences after rebaseSantiago Pastorino-2/+2
2020-01-28./x.py fmtSantiago Pastorino-10/+14
2020-01-28Place::ty_from takes local by valueSantiago Pastorino-39/+39
2020-01-28Local field on PlaceRef and RootPlace is not a reference anymoreSantiago Pastorino-68/+68
2020-01-28make_integrate_local takes Local by valueSantiago Pastorino-4/+4
2020-01-28record_killed_borrows_for_local takes Local by valueSantiago Pastorino-4/+4
2020-01-28Place conflict functions take Local by valueSantiago Pastorino-6/+6
2020-01-28Auto merge of #68587 - JohnTitor:rollup-fz45xwc, r=JohnTitorbors-0/+4
Rollup of 11 pull requests Successful merges: - #68200 (Stabilize the debug_map_key_value feature) - #68383 (Clean up E0205 explanation) - #68412 (Clean up E0207 explanation) - #68454 (clean up E0214 explanation) - #68482 (clean up error codes explanation) - #68563 (Don't call `tcx.fn_sig` on closures) - #68570 (Bump LLVM submodule to fix LLVM assertion failure in MSP430 interrupt generation.) - #68571 (check_match: extract common logic) - #68573 (Clean up E0262 explanation) - #68575 (Disable the testcase for Vxworks.) - #68581 (Add support for icebreakers-cleanup-crew commands) Failed merges: r? @ghost
2020-01-28check_unsafety: more code reuseMazdak Farrokhzad-39/+18
2020-01-27Don't call `tcx.fn_sig` on closuresAaron Hill-0/+4
Fixes #68542
2020-01-27don't clone types that are copy, round two.Matthias Krüger-72/+51
2020-01-25Rollup merge of #68111 - varkor:const-generics-type_name, r=oli-obkYuki Okushi-3/+2
Print constants in `type_name` for const generics Fixes https://github.com/rust-lang/rust/issues/65372. r? @oli-obk as there may have been a deliberate decision not to in https://github.com/rust-lang/rust/commit/5b9848912a85e28d000602fc2e81bad9c2f2a981#diff-4ed1a72c0bfdf17be769ed520932cd02R80.
2020-01-24Auto merge of #68494 - matthewjasper:internal-static-ptrs, r=nikomatsakisbors-22/+24
Make pointers to statics internal Closes #67611 r? @nikomatsakis
2020-01-24Normalise notes with the/isvarkor-1/+1
2020-01-24Normalise diagnostics with respect to "the X is declared/defined here"varkor-2/+2
2020-01-24Print constants in `type_name` for const genericsvarkor-3/+2
2020-01-24Auto merge of #68414 - michaelwoerister:share-drop-glue, r=alexcrichtonbors-35/+9
Also share drop-glue when compiling with -Zshare-generics (i.e. at opt-level=0) This PR adds drop-glue to the set of monomorphizations that can be shared across crates via `-Zshare-generics`. This version of the PR might have detrimental effects on performance as it makes lots of stuff dependent on a single query results (`upstream_monomorphizations_for(def_id_of_drop_in_place)`). That should be fixable but let's do a perf run first. Potentially fixes issue https://github.com/rust-lang/rust/issues/64140. (cc @alexcrichton) The changes here are related to @matthewjasper's https://github.com/rust-lang/rust/pull/67332 but should be mostly orthogonal. r? @ghost
2020-01-24Rollup merge of #68424 - estebank:suggest-borrow-for-non-copy-vec, r=davidtwcoTyler Mandry-4/+25
Suggest borrowing `Vec<NonCopy>` in for loop Partially address #64167.
2020-01-23Make pointers to statics internalMatthew Jasper-22/+24
2020-01-23use `diagnostic_item` and modify wordingEsteban Küber-6/+16
2020-01-23Add projection query for upstream drop-glue instances.Michael Woerister-31/+1
This reduces the amount of invalidated data when new types are add to upstream crates.
2020-01-23Make drop-glue take advantage of -Zshare-generics.Michael Woerister-4/+8
2020-01-22librustc_mir: don't allocate vectors where slices will do.Matthias Krüger-3/+3
2020-01-21Suggest borrowing `Vec<NonCopy>` in for loopEsteban Küber-0/+11
Partially address #64167.