about summary refs log tree commit diff
path: root/src/librustc/ty
AgeCommit message (Collapse)AuthorLines
2020-03-12Rollup merge of #69674 - mark-i-m:assoc-fn, r=matthewjasperMazdak Farrokhzad-4/+4
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-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-77/+215
2020-03-10rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.orgSantiago Pastorino-3/+3
2020-03-10Rename rustc guide to rustc dev guideSantiago Pastorino-6/+6
2020-03-10Rename rustc-guide to rustc-dev-guideSantiago Pastorino-3/+3
2020-03-09Remove the need for `no_force`John Kåre Alsaker-92/+105
2020-03-09Move `analysis` to the query macroJohn Kåre Alsaker-28/+2
2020-03-07Use ?-operator in more places (clippy::question_mark, had some false ↵Matthias Krüger-6/+1
negatives fixed recently)
2020-03-07Rollup merge of #69773 - matthiaskrgr:typos, r=petrochenkovMazdak Farrokhzad-8/+8
fix various typos
2020-03-07Rollup merge of #69782 - matthiaskrgr:redundant_field_name_rep, r=cramertjMazdak Farrokhzad-15/+12
Don't redundantly repeat field names (clippy::redundant_field_names)
2020-03-07Rollup merge of #69656 - matthiaskrgr:iter_nth_zero, r=oli-obkMazdak Farrokhzad-1/+1
Use .next() instead of .nth(0) on iterators.
2020-03-06Don't redundantly repeat field names (clippy::redundant_field_names)Matthias Krüger-15/+12
2020-03-06fix various typosMatthias Krüger-8/+8
2020-03-04cover some more nearby casesRalf Jung-8/+7
2020-03-04Auto merge of #69550 - RalfJung:scalar, r=oli-obkbors-1/+1
interpret engine: Scalar cleanup * Remove `to_ptr` * Make `to_bits` private r? @oli-obk
2020-03-03Rollup merge of #69621 - matthiaskrgr:q, r=petrochenkovDylan DPC-3/+1
use question mark operator in a few places.
2020-03-03DefKind::Method -> DefKind::AssocFnMark Mansi-4/+4
2020-03-03use question mark operator in a few places.Matthias Krüger-3/+1
2020-03-03Rollup merge of #69619 - matthiaskrgr:misc, r=eddybYuki Okushi-4/+2
more cleanups * use starts_with() instead of chars().next() == Some(x) * use subsec_micros() instead of subsec_nanos() / 1000 * use for (idx, item) in iter.enumerate() instead of manually counting loop iterations with variables * use values() or keys() respectively when iterating only over keys or values of maps.
2020-03-03Use .next() instead of .nth(0) on iterators.Matthias Krüger-1/+1
2020-03-01Clean up TypeFlagsMatthew Jasper-87/+99
* Reorder flags to group similar ones together * Make some flags more granular * Compute `HAS_FREE_LOCAL_NAMES` from the other flags * Remove `HAS_TY_CLOSURE` * Add some more doc comments
2020-03-01Fix use of `has_infer_types`Matthew Jasper-5/+5
* Add a new method `has_infer_types_or_consts` that's used instead most of the time, since there's generally no reason to only consider types. * Remove use of `has_closure_types`, because closures are no longer implicitly linked to the `InferCtxt`.
2020-03-01use for (idx, item) in iter.enumerate() instead of manually counting loop ↵Matthias Krüger-4/+2
iterations by variables
2020-03-01Auto merge of #69380 - Zoxc:parent-module, r=michaelwoeristerbors-4/+2
Use a query to get parent modules Split out from https://github.com/rust-lang/rust/pull/69015 / https://github.com/rust-lang/rust/pull/68944. r? @michaelwoerister
2020-03-01Auto merge of #69592 - petrochenkov:nosyntax, r=Centrilbors-20/+20
Rename `libsyntax` to `librustc_ast` This was the last rustc crate that wasn't following the `rustc_*` naming convention. Follow-up to https://github.com/rust-lang/rust/pull/67763.
2020-02-29Auto merge of #69590 - Dylan-DPC:rollup-i3z0sic, r=Dylan-DPCbors-2/+2
Rollup of 7 pull requests Successful merges: - #69504 (Use assert_ne in hash tests) - #69571 (remove unneeded .as_ref() calls.) - #69572 (use .iter() instead of .into_iter() on references) - #69581 (fix aliasing violation in align_to_mut) - #69582 (improve transmute and Vec::from_raw_parts docs) - #69584 (Correct comment to match behavior) - #69587 (rustc_parse: Tweak the function parameter name check) Failed merges: r? @ghost
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-18/+18
2020-02-29Rollup merge of #69572 - matthiaskrgr:try_err_and_iter_on_ref, r=CentrilDylan DPC-2/+2
use .iter() instead of .into_iter() on references
2020-02-29Make it build againVadim Petrochenkov-2/+2
2020-02-29Auto merge of #69263 - anyska:blacklist-powerpc-zst, r=nagisabors-7/+15
Blacklist powerpc-unknown-linux-{gnu,musl} as having non-ignored GNU C ZSTs. Ref #64259 (this is a simpler alternative to that). See also https://github.com/rust-lang/rust/pull/64259#issuecomment-585815831.
2020-02-29mem::zeroed/uninit: panic on types that do not permit zero-initializationRalf Jung-30/+0
2020-02-29Add a `parent_module_from_def_id` queryJohn Kåre Alsaker-4/+2