about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2019-11-27Auto merge of #66677 - wesleywiser:fix_const_prop_alloc_id_ice, r=oli-obkbors-7/+31
[const prop] Fix "alloc id without corresponding allocation" ICE r? @oli-obk
2019-11-27Auto merge of #66675 - GuillaumeGomez:support-anchors-intra-doc-links, ↵bors-28/+117
r=kinnison Support anchors intra doc links Fixes #62833 Part of #43466. cc @ollie27 r? @kinnison
2019-11-26Rollup merge of #66788 - ecstatic-morse:const-fn-unreachable, r=CentrilTyler Mandry-0/+21
Allow `Unreachable` terminators through `min_const_fn` checks Resolves #66756. This allows `Unreachable` terminators through the `min_const_fn` checks if `#![feature(const_if_match)]` is enabled. We could probably just allow them with no feature flag, but it seems okay to be conservative here. r? @oli-obk
2019-11-26Rollup merge of #66786 - jyn514:const-if-match-tests, r=CentrilTyler Mandry-0/+21
Add wildcard test for const_if_match Closes https://github.com/rust-lang/rust/issues/66758 Many thanks to @Centril for his help getting me started!
2019-11-26Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPCTyler Mandry-251/+72
Various tweaks to diagnostic output
2019-11-26Remove test for #66758Dylan MacKenzie-6/+0
2019-11-26Add regression test for #66756Dylan MacKenzie-0/+27
2019-11-26Test multiple variantsJoshua Nelson-0/+2
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-11-26Auto merge of #66631 - michaelwoerister:additional-pgo-tests, r=alexcrichtonbors-0/+251
Add additional regression tests for PGO This PR adds regression tests for making sure that - instrumentation records the right counts for branches taken and functions called, and that - the indirect call promotion pass actually is able to promote indirect calls. r? @alexcrichton
2019-11-26PGO: Make branch-weights regression test more robust.Michael Woerister-10/+10
2019-11-26Auto merge of #66561 - TimoFreiberg:trait-name-report, r=estebankbors-7/+137
Add version mismatch help message for unimplemented trait Improves issue #22750 The error reporting for E0277 (the trait `X` is not implemented for `Foo`) now checks whether `Foo` implements a trait with the same path as `X`, which probably means that the programmer wanted to actually use only one version of the trait `X` instead of the two. Still open: * the same diagnostic should be added for [the trait method case](https://github.com/rust-lang/rust/issues/22750#issuecomment-372077056) * Showing the real crate versions would be nice, but rustc currently doesn't have that information [according to Esteban](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/diagnostics.20for.20crate.20version.20mismatch/near/180572989)
2019-11-26Auto merge of #66522 - tmiasko:sanitize-flags, r=alexcrichtonbors-0/+62
Add support for sanitizer recover and tracking origins of uninitialized memory * Add support for sanitizer recovery `-Zsanitizer-recover=...` (equivalent to `-fsanitize-recover` in clang). * Add support for tracking origins of uninitialized memory in MemorySanitizer `-Zsanitizer-memory-track-origins` (equivalent to `-fsanitize-memory-track-origins` in clang).
2019-11-25Add wildcard test for const_if_matchJoshua Nelson-0/+19
Closes https://github.com/rust-lang/rust/issues/66758
2019-11-25Auto merge of #66178 - Aaron1011:fix/opaque-normalize, r=varkorbors-41/+103
Fix opaque types resulting from projections in function signature When we normalize the types in a function signature, we may end up resolving a projection to an opaque type (e.g. `Self::MyType` when we have `type MyType = impl SomeTrait`). When the projection is resolved, we will instantiate the generic parameters into fresh inference variables. While we do want to normalize projections to opaque types, we don't want to replace the explicit generic parameters (e.g. `T` in `impl MyTrait<T>`) with inference variables. We want the opaque type in the function signature to be eligible to be a defining use of that opaque type - adding inference variables prevents this, since the opaque type substs now appears to refer to some specific type, rather than a generic type. To resolve this issue, we inspect the opaque types in the function signature after normalization. Any inference variables in the substs are replaced with the corresponding generic parameter in the identity substs (e.g. `T` in `impl MyTrait<T>`). Note that normalization is the only way that we can end up with inference variables in opaque substs in a function signature - users have no way of getting inference variables into a function signature. Note that all of this refers to the opaque type (ty::Opaque) and its subst - *not* to the underlying type. Fixes #59342
2019-11-25Tweak removed feature errorEsteban Küber-6/+2
2019-11-25Tweak bad `continue` errorEsteban Küber-7/+2
2019-11-25Tweak duplicate matcher binding errorEsteban Küber-28/+12
2019-11-25Tweak duplicate fmt arg errorEsteban Küber-7/+3
2019-11-25Tweak move error due to non-CopyEsteban Küber-168/+29
2019-11-25Tweak multiple allocators errorEsteban Küber-7/+4
2019-11-25Fix capitalization when mentioning different crate versions in E0308Esteban Küber-12/+4
2019-11-25Auto merge of #66739 - pietroalbini:rollup-2t2pd4a, r=pietroalbinibors-0/+33
Rollup of 7 pull requests Successful merges: - #65613 (Preserve whitespace inside one-backtick codeblocks) - #66512 (Add unix::process::CommandExt::arg0) - #66569 (GitHub Actions: preparations, part 1) - #66678 (Remove useless line for error index generation) - #66684 (Drive-by cleanup in region naming) - #66694 (Add some comments to panic runtime) - #66698 (tidy: Remove unused import) Failed merges: r? @ghost
2019-11-25Rollup merge of #66512 - jsgf:process-argv0, r=Dylan-DPCPietro Albini-0/+33
Add unix::process::CommandExt::arg0 This allows argv[0] to be overridden on the executable's command-line. This also makes the program executed independent of argv[0]. Does Fuchsia have the same semantics? I'm assuming so. Addresses: #66510
2019-11-25Update error messagesGuillaume Gomez-36/+36
2019-11-25Auto merge of #66682 - estebank:fn-type-err, r=davidtwcobors-34/+34
Highlight parts of fn in type errors When a type error arises between two fn items, fn pointers or tuples, highlight only the differing parts of each. Examples: <img width="699" alt="" src="https://user-images.githubusercontent.com/1606434/69487597-ab561600-0e11-11ea-9b4e-d4fd9e91d5dc.png"> <img width="528" alt="" src="https://user-images.githubusercontent.com/1606434/69487207-9033d800-0e0a-11ea-93e3-8c4d002411a5.png"> <img width="468" alt="" src="https://user-images.githubusercontent.com/1606434/69487208-9033d800-0e0a-11ea-92e3-2b2cee120335.png"> <img width="775" alt="" src="https://user-images.githubusercontent.com/1606434/69487209-9033d800-0e0a-11ea-9e68-7f6ed5c8cb08.png">
2019-11-25Auto merge of #66669 - petrochenkov:tup2attr, r=matthewjasperbors-0/+22
Fix some issues with attributes on unnamed fields Fixes https://github.com/rust-lang/rust/issues/66487 Fixes https://github.com/rust-lang/rust/issues/66555
2019-11-24Fix some rustdoc error capitalizationEsteban Küber-16/+16
2019-11-25Auto merge of #66671 - matthewjasper:ast-address-of, r=Centrilbors-1/+382
Ast address-of This is the parts of #64588 that don't affect MIR. If an address-of expression makes it to MIR lowering we error and lower to the best currently expressible approximation to limit further errors. r? @Centril
2019-11-24Fix missing characterAaron Hill-1/+1
Co-Authored-By: varkor <github@varkor.com>
2019-11-24bug!() on const inference variable in opaque typeAaron Hill-0/+72
Add some tests to verify that this case is never hit
2019-11-24Improve error message when opaque type is not fully constrainedAaron Hill-41/+9
2019-11-24Fix opaque types resulting from projections in function signatureAaron Hill-0/+22
When we normalize the types in a function signature, we may end up resolving a projection to an opaque type (e.g. `Self::MyType` when we have `type MyType = impl SomeTrait`). When the projection is resolved, we will instantiate the generic parameters into fresh inference variables. While we do want to normalize projections to opaque types, we don't want to replace the explicit generic parameters (e.g. `T` in `impl MyTrait<T>`) with inference variables. We want the opaque type in the function signature to be eligible to be a defining use of that opaque type - adding inference variables prevents this, since the opaque type substs now appears to refer to some specific type, rather than a generic type. To resolve this issue, we inspect the opaque types in the function signature after normalization. Any inference variables in the substs are replaced with the corresponding generic parameter in the identity substs (e.g. `T` in `impl MyTrait<T>`). Note that normalization is the only way that we can end up with inference variables in opaque substs in a function signature - users have no way of getting inference variables into a function signature. Note that all of this refers to the opaque type (ty::Opaque) and its subst - *not* to the underlying type. Fixes #59342
2019-11-24Auto merge of #66647 - petrochenkov:nosynt, r=Centrilbors-224/+39
rustc_plugin: Remove support for syntactic plugins This part of the plugin interface was successfully replaced by token-based procedural macros in theory and in practice. cc https://github.com/rust-lang/rust/issues/29597 cc https://github.com/rust-lang/rust/pull/64675 r? @Centril
2019-11-24Add tests for raw_ref_opMatthew Jasper-11/+373
2019-11-24Add raw address of expressions to the AST and HIRMatthew Jasper-0/+19
2019-11-24fixup! Add negative tests where the diagnostic message would be wrongTimo Freiberg-14/+103
2019-11-24Add version mismatch help message for unimplemented traitTimo Freiberg-7/+48
Issue #22750 The error reporting for E0277 (the trait `X` is not implemented for `Foo`) now checks whether `Foo` implements a trait with the same path as `X`, which probably means that the programmer wanted to actually use only one version of the trait `X` instead of the two.
2019-11-24Auto merge of #66592 - estebank:raw-raw-ah-ah-ah, r=cramertjbors-30/+45
Rework raw ident suggestions Use heuristics to determine whethersuggesting raw identifiers is appropriate. Account for raw identifiers when printing a path in a `use` suggestion. Fix #66126.
2019-11-24rustc_plugin: Remove support for syntactic pluginsVadim Petrochenkov-224/+39
2019-11-24expand: Fully preserve visibilities on unnamed fields with attributesVadim Petrochenkov-0/+11
2019-11-24def_collector: Do not forget to save indices of fields with multiple attributesVadim Petrochenkov-0/+11
2019-11-24Rollup merge of #66641 - VirrageS:master, r=CentrilMazdak Farrokhzad-0/+34
parser: recover on nested ADTs as enum variants Closes: https://github.com/rust-lang/rust/issues/66127
2019-11-24Rollup merge of #64856 - jonhoo:format-temporaries, r=sfacklerMazdak Farrokhzad-26/+52
Scope format! temporaries This places the temporaries that `format!` generates to refer to its arguments (through `&dyn Trait`) in a short-lived scope surrounding just the invocation of `format!`. This enables `format!` to be used in generators without the temporaries preventing the generator from being `Send` (due to `dyn Trait` not being `Sync`). See rust-lang/rust#64477 for details.
2019-11-23Rework raw ident suggestionsEsteban Küber-30/+45
Use heuristics to determine whethersuggesting raw identifiers is appropriate. Account for raw identifiers when printing a path in a `use` suggestion.
2019-11-23Highlight parts of fn in type errorsEsteban Küber-34/+34
When a type error arises between two fn items, fn pointers or tuples, highlight only the differing parts of each.
2019-11-23Rollup merge of #66655 - ollie27:rustdoc_extern-private_unstable, ↵Mazdak Farrokhzad-0/+1
r=GuillaumeGomez rustdoc: Mark `--extern-private` as unstable It's not even stable in rustc so it shouldn't be stable in rustdoc. r? @kinnison
2019-11-23Rollup merge of #66539 - estebank:let-ty, r=CentrilMazdak Farrokhzad-348/+662
Point at type in `let` assignment on type errors Fix #61067.
2019-11-23Rollup merge of #61351 - GuillaumeGomez:stabilize-cfg-rustdoc, r=QuietMisdreavusMazdak Farrokhzad-16/+15
Stabilize cfg(doc) cc #43781.
2019-11-23[const prop] Fix "alloc id without corresponding allocation" ICEWesley Wiser-7/+31
Fixes #66345
2019-11-23Add test for anchorsGuillaume Gomez-0/+89