summary refs log tree commit diff
path: root/src/test/ui/const-generics
AgeCommit message (Collapse)AuthorLines
2020-03-02Remove chalk integrationCAD97-18/+0
2020-03-01Fix use of `has_infer_types`Matthew Jasper-14/+14
* 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-02-22Add note regarding argument orderingvarkor-8/+2
2020-02-22Expand the documentation for E0747varkor-10/+2
2020-02-22Move generic arg / param validation to `create_substs_for_generic_args`varkor-2/+56
2020-02-17Do not emit note suggesting to implement trait to foreign typeLeSeulArtichaut-4/+0
Update tests Extend to other operations Refractor check in a separate function Fix more tests
2020-02-13ast_validation: tweak diagnostic outputMazdak Farrokhzad-3/+3
2020-02-13Constness -> enum Const { Yes(Span), No }Mazdak Farrokhzad-1/+5
Same idea for `Unsafety` & use new span for better diagnostics.
2020-02-13Rollup merge of #67642 - Mark-Simulacrum:relax-bounds, r=AmanieuDylan DPC-15/+5
Relax bounds on HashMap/HashSet These APIs changed from the old bound listed to the new bound (possibly empty): K: Hash + Eq -> K * new * with_capacity K: Eq + Hash, S: BuildHasher -> K, S * with_hasher * with_capacity_and_hasher * hasher K: Eq + Hash + Debug -> K: Debug S: BuildHasher -> S HashMap as Debug K: Eq + Hash -> K S: BuildHasher + Default -> S: Default HashMap as Default Resolves #44777.
2020-02-11Auto merge of #68929 - matprec:consistent-issue-references, r=Dylan-DPCbors-3/+3
Make issue references consistent Fixes https://github.com/rust-lang/rust/issues/62976 cc https://github.com/rust-lang/rust/pull/63008 r? @varkor because you reviewed the original pr
2020-02-09--bless --compare-mode=nllMatthias Prechtl-3/+3
2020-02-07Merge branch 'master' of https://github.com/jwhite927/rust into E0637Josh White-0/+3
2020-02-07performed --bless of 15 ui tests affectedJosh White-0/+1
2020-02-06rustc_macros: don't limit the -Zmacro-backtrace suggestion to extern macros.Eduard-Mihai Burtescu-0/+3
2020-01-31Auto merge of #68080 - varkor:declared-here, r=petrochenkovbors-1/+1
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-24Normalise notes with the/isvarkor-1/+1
2020-01-24Print constants in `type_name` for const genericsvarkor-0/+19
2020-01-21Make `TooGeneric` error in WF checking a proper errorvarkor-5/+22
`TooGeneric` is encountered during WF checking when we cannot determine that a constant involving a generic parameter will always be evaluated successfully (rather than resulting in an error). In these cases, the burden of proof should be with the caller, so that we can avoid post-monomorphisation tim errors (which was the previous previous behaviour). This commit ensures that this situation produces a proper compiler error, rather than silently ignoring it or ICEing.
2020-01-17Rollup merge of #68312 - varkor:issue-67753-regression, r=CentrilTyler Mandry-0/+26
Add regression test for integer literals in generic arguments in where clauses Closes https://github.com/rust-lang/rust/issues/67753.
2020-01-17Add regression test for integer literals in generic arguments in where clausesvarkor-0/+26
2020-01-16review commentsEsteban Küber-7/+7
2020-01-16When trait bounds are missing for return values, point at themEsteban Küber-0/+36
2020-01-12Update test benchmark fileBen Lewis-6/+6
2020-01-12Added comment about behaviour.Ben Lewis-0/+5
2020-01-12Forbid elided lifetimes within const generic parameter types.Ben Lewis-0/+59
2020-01-08Unify output of "variant not found" errorsEsteban Küber-1/+1
2020-01-05Silence `TooGeneric` errorvarkor-0/+31
This error may be produced during intermediate failed attempts at evaluation of a generic const, which may nevertheless succeed later.
2019-12-26Relax bounds on HashSet to match hashbrownMark Rousskov-15/+5
No functional changes are made, and all APIs are moved to strictly less restrictive bounds. These APIs changed from the old bound listed to the new bound: T: Hash + Eq -> T * new * with_capacity T: Eq + Hash, S: BuildHasher -> T * with_hasher * with_capacity_and_hasher * hasher T: Eq + Hash + Debug -> T: Debug S: BuildHasher -> S <HashSet as Debug> T: Eq + Hash -> T S: BuildHasher + Default -> S: Default <HashSet as Default>
2019-12-24Rollup merge of #67543 - JohnTitor:regression-tests, r=CentrilMazdak Farrokhzad-0/+34
Add regression tests for fixed ICEs Closes #61747 (fixed from 1.41.0-nightly (4007d4ef2 2019-12-01)) Closes #66205 (fixed from 1.41.0-nightly (4007d4ef2 2019-12-01)) Closes #66270 (fixed by #66246) Closes #67424 (fixed by #67160) Also picking a minor nit up from #67071 with 101dd7bad9432730fa2f625ae43afcc2929457d4 r? @Centril
2019-12-24Apply suggestion from CentrilYuki Okushi-1/+1
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2019-12-22Remove mem::uninitalized from testsMark Rousskov-0/+12
This purges uses of uninitialized where possible from test cases. Some are merely moved over to the equally bad pattern of MaybeUninit::uninit().assume_init() but with an annotation that this is "the best we can do".
2019-12-23Add test for issue-66205Yuki Okushi-0/+10
2019-12-23Add test for issue-61747Yuki Okushi-0/+24
2019-12-20Rollup merge of #67354 - VirrageS:blame-wrong-line, r=estebankMazdak Farrokhzad-5/+15
Fix pointing at arg when cause is outside of call Follow up after: #66933 Closes: #66923 r? @estebank
2019-12-14Indicate origin of where type parameter for uninferred typesOhad Ravid-1/+1
2019-12-11Add more context for type parametersEsteban Küber-2/+2
2019-12-07Rename tests and add short test descriptionJanusz Marcinkiewicz-5/+15
2019-11-25Auto merge of #66682 - estebank:fn-type-err, r=davidtwcobors-2/+2
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-23Highlight parts of fn in type errorsEsteban Küber-2/+2
When a type error arises between two fn items, fn pointers or tuples, highlight only the differing parts of each.
2019-11-21Point at type in `let` assignment on type errorsEsteban Küber-8/+24
2019-11-21Auto merge of #66389 - estebank:type-err-labels, r=petrochenkovbors-26/+20
Specific labels when referring to "expected" and "found" types
2019-11-18test: const-generics: Update tests removing unrequired bracesGabriel Smith-19/+19
Braces were left in cases where generic args were in the generic const paths.
2019-11-18Surround types with backticks in type errorsEsteban Küber-2/+2
2019-11-18Remove E0308 note when primary label has all infoEsteban Küber-6/+0
2019-11-18Specific labels when referring to "expected" and "found" typesEsteban Küber-22/+22
2019-11-06Remove "here" from "expected one of X here"Esteban Küber-1/+1
2019-11-03Auto merge of #65759 - tmiasko:ui, r=petrochenkovbors-3/+2
Validate error patterns and error annotation in ui tests when present Previously, when compilation succeeded, neither error patterns nor error annotation would be validated. Additionally, when compilation failed, only error patterns would be validated if both error patterns and error annotation were present. Now both error patterns and error annotation are validated when present, regardless of compilation status. Furthermore, for test that should run, the error patterns are matched against executable output, which is what some of tests already expect to happen, and when #65506 is merged even more ui tests will. Fixes #56277
2019-11-02Update error annotations in tests that successfully compileTomasz Miąsko-3/+2
Those annotation are silently ignored rather than begin validated against compiler output. Update them before validation is enabled, to avoid test failures.
2019-10-31Revert "pre-expansion gate const_generics"Eduard-Mihai Burtescu-6/+6
This reverts commit 49cbfa1a6f6469ddbc0e88161e52104cc87aea9b.
2019-10-27Point at local similarly named element and tweak references to variantsEsteban Küber-1/+4
Point at the span for the definition of ADTs internal to the current crate. Look at the leading char of the ident to determine whether we're expecting a likely fn or any of a fn, a tuple struct or a tuple variant. Turn fn `add_typo_suggestion` into a `Resolver` method.