about summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2020-03-11make error message less confusingRalf Jung-2/+2
2020-03-11generalize InvalidNullPointerUsage to InvalidIntPointerUsageRalf Jung-9/+5
2020-03-11fmt, tweak messages and blessRalf Jung-20/+25
2020-03-11miri: categorize errors into "unsupported" and "UB"Ralf Jung-213/+129
Also slightly refactor pointer bounds checks to avoid creating unnecessary temporary Errors
2020-03-11Rollup merge of #69888 - wesleywiser:miri_exception_env_var_to_session_var, ↵Mazdak Farrokhzad-13/+20
r=RalfJung [Miri] Use a session variable instead of checking for an env var always In CTFE heavy code, checking the env var everytime is inefficient. We can do a lot better by using a `Session` variable instead. r? @RalfJung Part of #69297
2020-03-11Compute the correct layout for variants of uninhabited enums and readd a ↵Oliver Scherer-3/+11
long lost assertion This reverts part of commit 9712fa405944cb8d5416556ac4b1f26365a10658.
2020-03-11Rollup merge of #66059 - RalfJung:panic-on-non-zero, r=eddybMazdak Farrokhzad-30/+0
mem::zeroed/uninit: panic on types that do not permit zero-initialization r? @eddyb @oli-obk Cc https://github.com/rust-lang/rust/issues/62825 Also see [this summary comment](https://github.com/rust-lang/rust/pull/66059#issuecomment-586734747)
2020-03-11Address review commentsOliver Scherer-1/+1
2020-03-11Generalize typed value printing and use for undef printingOliver Scherer-17/+9
2020-03-11Don't print literal type suffixes if `print_ty` is falseOliver Scherer-2/+9
2020-03-11Print function pointer type for function pointer const genericsOliver Scherer-1/+5
2020-03-11Reuse type ascripted printing for type cast printingOliver Scherer-9/+27
2020-03-11Don't print all zsts as their type as it makes no sense for more complex ↵Oliver Scherer-3/+20
examples (e.g. structs)
2020-03-11Prefer fall through to code repetitionOliver Scherer-20/+34
2020-03-11Print leading zeros for non pointersOliver Scherer-2/+2
2020-03-11Reduce special casing in the const pretty printerOliver Scherer-9/+3
2020-03-11Don't print leading zeros on hex dumps constantsOliver Scherer-4/+3
2020-03-11Eliminate all ParamEnv::empty uses in pretty printingOliver Scherer-22/+19
2020-03-11Print braces only in print_ty modeOliver Scherer-43/+43
2020-03-11Address review comments around `type_ascribed_value`Oliver Scherer-40/+41
2020-03-11Deduplicate and clean up pretty printing logicOliver Scherer-85/+223
2020-03-10[Miri] Use a session variable instead of checking for an env var alwaysWesley Wiser-13/+20
In CTFE heavy code, checking the env var everytime is inefficient. We can do a lot better by using a `Session` variable instead.
2020-03-10rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.orgSantiago Pastorino-13/+13
2020-03-10Rename rustc guide to rustc dev guideSantiago Pastorino-24/+24
2020-03-10Rename rustc-guide to rustc-dev-guideSantiago Pastorino-13/+13
2020-03-10Auto merge of #66364 - Centril:cleanup-macro-def, r=petrochenkov,eddybbors-10/+5
Cleanup `rmeta::MacroDef` Avoid using rountrip parsing in the encoder and in `fn load_macro_untracked`. The main reason I was interested in this was to remove `rustc_parse` as a dependency of `rustc_metadata` but it seems like this had other benefits as well. Fixes #49511. r? @eddyb cc @matthewjasper @estebank @petrochenkov
2020-03-10Store `TokenStream` in `rmeta::MacroDef`.Mazdak Farrokhzad-10/+5
This removes a hack from `load_macro_untracked` in which parsing is used.
2020-03-10Rollup merge of #69714 - spastorino:place-ref-lifetime, r=oli-obkMazdak Farrokhzad-4/+4
Make PlaceRef take just one lifetime r? @eddyb
2020-03-10Rollup merge of #69475 - Zoxc:no-no-force, r=michaelwoeristerMazdak Farrokhzad-185/+140
Remove the `no_force` query attribute This removes the `no_force` query attribute and instead uses the `DepNodeParams` trait to find out if a query can be forced. Also the `analysis` query is moved to the query macro. r? @eddyb
2020-03-09Add a comment to `recover`.John Kåre Alsaker-0/+6
2020-03-09Remove the `no_force` query attributeJohn Kåre Alsaker-38/+0
2020-03-09Remove the need for `no_force`John Kåre Alsaker-117/+127
2020-03-09Move `analysis` to the query macroJohn Kåre Alsaker-30/+7
2020-03-09Rollup merge of #69762 - RalfJung:validity-errors, r=oli-obkMazdak Farrokhzad-4/+23
Ensure that validity only raises validity errors For now, only as a debug-assertion (similar to const-prop detecting errors that allocate). Now includes https://github.com/rust-lang/rust/pull/69646. [Relative diff](https://github.com/RalfJung/rust/compare/layout-visitor...RalfJung:validity-errors). r? @oli-obk
2020-03-08use static strings instead of tcxRalf Jung-5/+5
2020-03-08Fix typoRalf Jung-2/+2
Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
2020-03-08fix some cases of unexpected exceptions leaving validationRalf Jung-5/+8
2020-03-08move error allocation test to error.rsRalf Jung-1/+17
2020-03-08Rollup merge of #69326 - JOE1994:os_str_widestring, r=RalfJungMazdak Farrokhzad-0/+10
mir-interpret: add method to read wide strings from Memory Implemented *step2* from [instructions](https://github.com/rust-lang/miri/issues/707#issuecomment-561564057) laid out in rust-lang/miri#707. Added 2 new methods to struct `rustc_mir::interpret::InterpCx`. * `read_os_str_from_wide_str` (src/librustc_mir/interpret/operand.rs) * `write_os_str_to_wide_str` (src/librustc_mir/interpret/place.rs) - used existing logic implemented in [MIRI/src/eval.rs](https://github.com/rust-lang/miri/blob/94732aaf7bf79fd01a4a48d11155c6586b937514/src/eval.rs#L132-L141) These methods are intended to be used for environment variable emulation in Windows.
2020-03-07refactor: Add an alias for the SmallVec in dep_graphMarkus Westerlind-10/+8
2020-03-07Use ?-operator in more places (clippy::question_mark, had some false ↵Matthias Krüger-7/+2
negatives fixed recently)
2020-03-07Rollup merge of #69787 - spastorino:use-local-directly-its-copy, r=oli-obkMazdak Farrokhzad-5/+5
mir::Local is Copy we can pass it by value in these cases r? @oli-obk
2020-03-07Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkovMazdak Farrokhzad-10/+10
fix various typos
2020-03-07Rollup merge of #69667 - JohnTitor:no-debug, r=nikomatsakisMazdak Farrokhzad-3/+0
Remove the `no_debug` feature Context: https://github.com/rust-lang/rust/issues/29721#issuecomment-367642779 r? @nikomatsakis
2020-03-07Rollup merge of #69782 - matthiaskrgr:redundant_field_name_rep, r=cramertjMazdak Farrokhzad-20/+17
Don't redundantly repeat field names (clippy::redundant_field_names)
2020-03-07Rollup merge of #69656 - matthiaskrgr:iter_nth_zero, r=oli-obkMazdak Farrokhzad-2/+2
Use .next() instead of .nth(0) on iterators.
2020-03-06mir-interpret: add method Memory::read wide_stringJOE1994-0/+10
2020-03-06mir::Local is Copy we can pass it by value in these casesSantiago Pastorino-5/+5
2020-03-06Don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-20/+17
2020-03-07Remove `NO_DEBUG` constYuki Okushi-3/+0