diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/lifetimes/auxiliary/issue-91763-aux.rs (renamed from src/test/ui/lifetimes/auxiliary/issue-91763-aux.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs (renamed from src/test/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/bare-trait-object-borrowck.rs (renamed from src/test/ui/lifetimes/bare-trait-object-borrowck.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/bare-trait-object.rs (renamed from src/test/ui/lifetimes/bare-trait-object.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/borrowck-let-suggestion.rs (renamed from src/test/ui/lifetimes/borrowck-let-suggestion.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/borrowck-let-suggestion.stderr (renamed from src/test/ui/lifetimes/borrowck-let-suggestion.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/conflicting-bounds.rs | 11 | ||||
-rw-r--r-- | tests/ui/lifetimes/conflicting-bounds.stderr | 14 | ||||
-rw-r--r-- | tests/ui/lifetimes/copy_modulo_regions.rs (renamed from src/test/ui/lifetimes/copy_modulo_regions.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/copy_modulo_regions.stderr (renamed from src/test/ui/lifetimes/copy_modulo_regions.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/elided-lifetime-in-param-pat.rs (renamed from src/test/ui/lifetimes/elided-lifetime-in-param-pat.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs (renamed from src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs (renamed from src/test/ui/lifetimes/elided-lifetime-in-path-in-pat.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs (renamed from src/test/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/fullwidth-ampersand.rs (renamed from src/test/ui/lifetimes/fullwidth-ampersand.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/fullwidth-ampersand.stderr (renamed from src/test/ui/lifetimes/fullwidth-ampersand.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-105227.fixed | 26 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-105227.rs | 26 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-105227.stderr | 47 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-105507.fixed | 43 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-105507.rs | 43 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-105507.stderr | 34 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-17728.rs (renamed from src/test/ui/lifetimes/issue-17728.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-17728.stderr (renamed from src/test/ui/lifetimes/issue-17728.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-26638.rs (renamed from src/test/ui/lifetimes/issue-26638.rs) | 2 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-26638.stderr (renamed from src/test/ui/lifetimes/issue-26638.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-34979.rs (renamed from src/test/ui/lifetimes/issue-34979.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-34979.stderr | 20 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-54378.rs (renamed from src/test/ui/lifetimes/issue-54378.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-55796.rs (renamed from src/test/ui/lifetimes/issue-55796.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-55796.stderr (renamed from src/test/ui/lifetimes/issue-55796.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-64173-unused-lifetimes.rs (renamed from src/test/ui/lifetimes/issue-64173-unused-lifetimes.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr (renamed from src/test/ui/lifetimes/issue-64173-unused-lifetimes.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-67498.rs (renamed from src/test/ui/lifetimes/issue-67498.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs (renamed from src/test/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-76168-hr-outlives-2.rs (renamed from src/test/ui/lifetimes/issue-76168-hr-outlives-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-76168-hr-outlives.rs (renamed from src/test/ui/lifetimes/issue-76168-hr-outlives.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-77175.rs (renamed from src/test/ui/lifetimes/issue-77175.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-79187-2.rs (renamed from src/test/ui/lifetimes/issue-79187-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-79187-2.stderr (renamed from src/test/ui/lifetimes/issue-79187-2.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-79187.rs (renamed from src/test/ui/lifetimes/issue-79187.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-79187.stderr (renamed from src/test/ui/lifetimes/issue-79187.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-83737-binders-across-types.rs (renamed from src/test/ui/lifetimes/issue-83737-binders-across-types.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs (renamed from src/test/ui/lifetimes/issue-83737-erasing-bound-vars.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs (renamed from src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr (renamed from src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs (renamed from src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr (renamed from src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-84398.rs (renamed from src/test/ui/lifetimes/issue-84398.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-84604.rs (renamed from src/test/ui/lifetimes/issue-84604.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-90170-elision-mismatch.fixed (renamed from src/test/ui/lifetimes/issue-90170-elision-mismatch.fixed) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-90170-elision-mismatch.rs (renamed from src/test/ui/lifetimes/issue-90170-elision-mismatch.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-90170-elision-mismatch.stderr (renamed from src/test/ui/lifetimes/issue-90170-elision-mismatch.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-90600-expected-return-static-indirect.rs (renamed from src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr (renamed from src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-91763.rs (renamed from src/test/ui/lifetimes/issue-91763.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-91763.stderr (renamed from src/test/ui/lifetimes/issue-91763.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-95023.rs (renamed from src/test/ui/lifetimes/issue-95023.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-95023.stderr (renamed from src/test/ui/lifetimes/issue-95023.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-97193.rs (renamed from src/test/ui/lifetimes/issue-97193.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-97193.stderr (renamed from src/test/ui/lifetimes/issue-97193.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-97194.rs (renamed from src/test/ui/lifetimes/issue-97194.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/issue-97194.stderr (renamed from src/test/ui/lifetimes/issue-97194.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-bound-will-change-warning.rs (renamed from src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-bound-will-change-warning.stderr (renamed from src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-doesnt-live-long-enough.rs (renamed from src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr (renamed from src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.rs (renamed from src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr (renamed from src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-elision-return-type-trait.rs (renamed from src/test/ui/lifetimes/lifetime-elision-return-type-trait.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr (renamed from src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.rs (renamed from src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr) | 7 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr) | 7 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.rs (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/issue_74400.rs (renamed from src/test/ui/lifetimes/lifetime-errors/issue_74400.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/issue_74400.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/issue_74400.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs (renamed from src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr (renamed from src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.rs (renamed from src/test/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr (renamed from src/test/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr) | 4 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-no-keyword.rs (renamed from src/test/ui/lifetimes/lifetime-no-keyword.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/lifetime-no-keyword.stderr (renamed from src/test/ui/lifetimes/lifetime-no-keyword.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/missing-lifetime-in-alias.rs (renamed from src/test/ui/lifetimes/missing-lifetime-in-alias.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/missing-lifetime-in-alias.stderr (renamed from src/test/ui/lifetimes/missing-lifetime-in-alias.stderr) | 2 | ||||
-rw-r--r-- | tests/ui/lifetimes/nested-binder-print.rs (renamed from src/test/ui/lifetimes/nested-binder-print.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/nested-binder-print.stderr (renamed from src/test/ui/lifetimes/nested-binder-print.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/nested.rs (renamed from src/test/ui/lifetimes/nested.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/re-empty-in-error.rs (renamed from src/test/ui/lifetimes/re-empty-in-error.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/re-empty-in-error.stderr (renamed from src/test/ui/lifetimes/re-empty-in-error.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/shadow.rs (renamed from src/test/ui/lifetimes/shadow.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/shadow.stderr (renamed from src/test/ui/lifetimes/shadow.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed | 13 | ||||
-rw-r--r-- | tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs (renamed from src/test/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs) | 4 | ||||
-rw-r--r-- | tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.stderr | 24 | ||||
-rw-r--r-- | tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs (renamed from src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr (renamed from src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs (renamed from src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr (renamed from src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/unusual-rib-combinations.rs (renamed from src/test/ui/lifetimes/unusual-rib-combinations.rs) | 0 | ||||
-rw-r--r-- | tests/ui/lifetimes/unusual-rib-combinations.stderr (renamed from src/test/ui/lifetimes/unusual-rib-combinations.stderr) | 0 |
169 files changed, 319 insertions, 8 deletions
diff --git a/src/test/ui/lifetimes/auxiliary/issue-91763-aux.rs b/tests/ui/lifetimes/auxiliary/issue-91763-aux.rs index 0335f72b7..0335f72b7 100644 --- a/src/test/ui/lifetimes/auxiliary/issue-91763-aux.rs +++ b/tests/ui/lifetimes/auxiliary/issue-91763-aux.rs diff --git a/src/test/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs b/tests/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs index 58f1b81cf..58f1b81cf 100644 --- a/src/test/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs +++ b/tests/ui/lifetimes/auxiliary/lifetime_bound_will_change_warning_lib.rs diff --git a/src/test/ui/lifetimes/bare-trait-object-borrowck.rs b/tests/ui/lifetimes/bare-trait-object-borrowck.rs index 45f5e4ae1..45f5e4ae1 100644 --- a/src/test/ui/lifetimes/bare-trait-object-borrowck.rs +++ b/tests/ui/lifetimes/bare-trait-object-borrowck.rs diff --git a/src/test/ui/lifetimes/bare-trait-object.rs b/tests/ui/lifetimes/bare-trait-object.rs index 9eff618c7..9eff618c7 100644 --- a/src/test/ui/lifetimes/bare-trait-object.rs +++ b/tests/ui/lifetimes/bare-trait-object.rs diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.rs b/tests/ui/lifetimes/borrowck-let-suggestion.rs index 3d591a506..3d591a506 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.rs +++ b/tests/ui/lifetimes/borrowck-let-suggestion.rs diff --git a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr b/tests/ui/lifetimes/borrowck-let-suggestion.stderr index 987b051b1..987b051b1 100644 --- a/src/test/ui/lifetimes/borrowck-let-suggestion.stderr +++ b/tests/ui/lifetimes/borrowck-let-suggestion.stderr diff --git a/tests/ui/lifetimes/conflicting-bounds.rs b/tests/ui/lifetimes/conflicting-bounds.rs new file mode 100644 index 000000000..f37f163db --- /dev/null +++ b/tests/ui/lifetimes/conflicting-bounds.rs @@ -0,0 +1,11 @@ +//~ type annotations needed: cannot satisfy `Self: Gen<'source>` + +pub trait Gen<'source> { + type Output; + + fn gen<T>(&self) -> T + where + Self: for<'s> Gen<'s, Output = T>; +} + +fn main() {} diff --git a/tests/ui/lifetimes/conflicting-bounds.stderr b/tests/ui/lifetimes/conflicting-bounds.stderr new file mode 100644 index 000000000..42aa39366 --- /dev/null +++ b/tests/ui/lifetimes/conflicting-bounds.stderr @@ -0,0 +1,14 @@ +error[E0283]: type annotations needed: cannot satisfy `Self: Gen<'source>` + | +note: multiple `impl`s or `where` clauses satisfying `Self: Gen<'source>` found + --> $DIR/conflicting-bounds.rs:3:1 + | +LL | pub trait Gen<'source> { + | ^^^^^^^^^^^^^^^^^^^^^^ +... +LL | Self: for<'s> Gen<'s, Output = T>; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0283`. diff --git a/src/test/ui/lifetimes/copy_modulo_regions.rs b/tests/ui/lifetimes/copy_modulo_regions.rs index 040fc4a00..040fc4a00 100644 --- a/src/test/ui/lifetimes/copy_modulo_regions.rs +++ b/tests/ui/lifetimes/copy_modulo_regions.rs diff --git a/src/test/ui/lifetimes/copy_modulo_regions.stderr b/tests/ui/lifetimes/copy_modulo_regions.stderr index 87dbb64ab..87dbb64ab 100644 --- a/src/test/ui/lifetimes/copy_modulo_regions.stderr +++ b/tests/ui/lifetimes/copy_modulo_regions.stderr diff --git a/src/test/ui/lifetimes/elided-lifetime-in-param-pat.rs b/tests/ui/lifetimes/elided-lifetime-in-param-pat.rs index c1425fa42..c1425fa42 100644 --- a/src/test/ui/lifetimes/elided-lifetime-in-param-pat.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-param-pat.rs diff --git a/src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs b/tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs index 9c9965d8f..9c9965d8f 100644 --- a/src/test/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-path-in-impl-Fn.rs diff --git a/src/test/ui/lifetimes/elided-lifetime-in-path-in-pat.rs b/tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs index ff84d2511..ff84d2511 100644 --- a/src/test/ui/lifetimes/elided-lifetime-in-path-in-pat.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-path-in-pat.rs diff --git a/src/test/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs b/tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs index b9d2711fd..b9d2711fd 100644 --- a/src/test/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs +++ b/tests/ui/lifetimes/elided-lifetime-in-path-in-type-relative-expression.rs diff --git a/src/test/ui/lifetimes/fullwidth-ampersand.rs b/tests/ui/lifetimes/fullwidth-ampersand.rs index 7d8948bd8..7d8948bd8 100644 --- a/src/test/ui/lifetimes/fullwidth-ampersand.rs +++ b/tests/ui/lifetimes/fullwidth-ampersand.rs diff --git a/src/test/ui/lifetimes/fullwidth-ampersand.stderr b/tests/ui/lifetimes/fullwidth-ampersand.stderr index 4645254f4..4645254f4 100644 --- a/src/test/ui/lifetimes/fullwidth-ampersand.stderr +++ b/tests/ui/lifetimes/fullwidth-ampersand.stderr diff --git a/tests/ui/lifetimes/issue-105227.fixed b/tests/ui/lifetimes/issue-105227.fixed new file mode 100644 index 000000000..f6ed9c82e --- /dev/null +++ b/tests/ui/lifetimes/issue-105227.fixed @@ -0,0 +1,26 @@ +// Regression test for issue #105227. + +// run-rustfix +#![allow(warnings)] +fn chars0<'a>(v :(&'a str, &'a str)) -> impl Iterator<Item = char> + 'a { +//~^ HELP to declare that `impl Iterator<Item = char>` captures `'_`, you can introduce a named lifetime parameter `'a` + v.0.chars().chain(v.1.chars()) + //~^ ERROR hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds +} + +fn chars1<'a>(v0 : &'a str, v1 : &'a str) -> impl Iterator<Item = char> + 'a { +//~^ HELP to declare that `impl Iterator<Item = char>` captures `'_`, you can introduce a named lifetime parameter `'a` + v0.chars().chain(v1.chars()) + //~^ ERROR hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bound +} + +fn chars2<'b>(v0 : &'b str, v1 : &'b str, v2 : &'b str) -> +//~^ HELP to declare that `impl Iterator<Item = char>` captures `'_`, you can use the named lifetime parameter `'b` + (impl Iterator<Item = char> + 'b , &'b str) +{ + (v0.chars().chain(v1.chars()), v2) + //~^ ERROR hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bound +} + +fn main() { +} diff --git a/tests/ui/lifetimes/issue-105227.rs b/tests/ui/lifetimes/issue-105227.rs new file mode 100644 index 000000000..6427a50bb --- /dev/null +++ b/tests/ui/lifetimes/issue-105227.rs @@ -0,0 +1,26 @@ +// Regression test for issue #105227. + +// run-rustfix +#![allow(warnings)] +fn chars0(v :(& str, &str)) -> impl Iterator<Item = char> { +//~^ HELP to declare that `impl Iterator<Item = char>` captures `'_`, you can introduce a named lifetime parameter `'a` + v.0.chars().chain(v.1.chars()) + //~^ ERROR hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds +} + +fn chars1(v0 : & str, v1 : &str) -> impl Iterator<Item = char> { +//~^ HELP to declare that `impl Iterator<Item = char>` captures `'_`, you can introduce a named lifetime parameter `'a` + v0.chars().chain(v1.chars()) + //~^ ERROR hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bound +} + +fn chars2<'b>(v0 : &str, v1 : &'_ str, v2 : &'b str) -> +//~^ HELP to declare that `impl Iterator<Item = char>` captures `'_`, you can use the named lifetime parameter `'b` + (impl Iterator<Item = char>, &'b str) +{ + (v0.chars().chain(v1.chars()), v2) + //~^ ERROR hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bound +} + +fn main() { +} diff --git a/tests/ui/lifetimes/issue-105227.stderr b/tests/ui/lifetimes/issue-105227.stderr new file mode 100644 index 000000000..d21145937 --- /dev/null +++ b/tests/ui/lifetimes/issue-105227.stderr @@ -0,0 +1,47 @@ +error[E0700]: hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds + --> $DIR/issue-105227.rs:7:5 + | +LL | fn chars0(v :(& str, &str)) -> impl Iterator<Item = char> { + | ----- hidden type `std::iter::Chain<Chars<'_>, Chars<'_>>` captures the anonymous lifetime defined here +LL | +LL | v.0.chars().chain(v.1.chars()) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: to declare that `impl Iterator<Item = char>` captures `'_`, you can introduce a named lifetime parameter `'a` + | +LL | fn chars0<'a>(v :(&'a str, &'a str)) -> impl Iterator<Item = char> + 'a { + | ++++ ++ ++ ++++ + +error[E0700]: hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds + --> $DIR/issue-105227.rs:13:5 + | +LL | fn chars1(v0 : & str, v1 : &str) -> impl Iterator<Item = char> { + | ----- hidden type `std::iter::Chain<Chars<'_>, Chars<'_>>` captures the anonymous lifetime defined here +LL | +LL | v0.chars().chain(v1.chars()) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: to declare that `impl Iterator<Item = char>` captures `'_`, you can introduce a named lifetime parameter `'a` + | +LL | fn chars1<'a>(v0 : &'a str, v1 : &'a str) -> impl Iterator<Item = char> + 'a { + | ++++ ++ ++ ++++ + +error[E0700]: hidden type for `impl Iterator<Item = char>` captures lifetime that does not appear in bounds + --> $DIR/issue-105227.rs:21:5 + | +LL | fn chars2<'b>(v0 : &str, v1 : &'_ str, v2 : &'b str) -> + | ---- hidden type `std::iter::Chain<Chars<'_>, Chars<'_>>` captures the anonymous lifetime defined here +... +LL | (v0.chars().chain(v1.chars()), v2) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: to declare that `impl Iterator<Item = char>` captures `'_`, you can use the named lifetime parameter `'b` + | +LL ~ fn chars2<'b>(v0 : &'b str, v1 : &'b str, v2 : &'b str) -> +LL | +LL ~ (impl Iterator<Item = char> + 'b , &'b str) + | + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0700`. diff --git a/tests/ui/lifetimes/issue-105507.fixed b/tests/ui/lifetimes/issue-105507.fixed new file mode 100644 index 000000000..277ce8a77 --- /dev/null +++ b/tests/ui/lifetimes/issue-105507.fixed @@ -0,0 +1,43 @@ +// run-rustfix +// +#![allow(warnings)] +struct Wrapper<'a, T: ?Sized>(&'a T); + +trait Project { + type Projected<'a> where Self: 'a; + fn project(this: Wrapper<'_, Self>) -> Self::Projected<'_>; +} +trait MyTrait {} +trait ProjectedMyTrait {} + +impl<T> Project for Option<T> { + type Projected<'a> = Option<Wrapper<'a, T>> where T: 'a; + fn project(this: Wrapper<'_, Self>) -> Self::Projected<'_> { + this.0.as_ref().map(Wrapper) + } +} + +impl<T: MyTrait> MyTrait for Option<Wrapper<'_, T>> {} + +impl<T: ProjectedMyTrait> MyTrait for Wrapper<'_, T> {} + +impl<T> ProjectedMyTrait for T + where + T: Project, + for<'a> T::Projected<'a>: MyTrait, + //~^ NOTE due to current limitations in the borrow checker, this implies a `'static` lifetime + //~| NOTE due to current limitations in the borrow checker, this implies a `'static` lifetime +{} + +fn require_trait<T: MyTrait>(_: T) {} + +fn foo<T : MyTrait + 'static + 'static, U : MyTrait + 'static + 'static>(wrap: Wrapper<'_, Option<T>>, wrap1: Wrapper<'_, Option<U>>) { + //~^ HELP consider restricting the type parameter to the `'static` lifetime + //~| HELP consider restricting the type parameter to the `'static` lifetime + require_trait(wrap); + //~^ ERROR `T` does not live long enough + require_trait(wrap1); + //~^ ERROR `U` does not live long enough +} + +fn main() {} diff --git a/tests/ui/lifetimes/issue-105507.rs b/tests/ui/lifetimes/issue-105507.rs new file mode 100644 index 000000000..f46c6b6f2 --- /dev/null +++ b/tests/ui/lifetimes/issue-105507.rs @@ -0,0 +1,43 @@ +// run-rustfix +// +#![allow(warnings)] +struct Wrapper<'a, T: ?Sized>(&'a T); + +trait Project { + type Projected<'a> where Self: 'a; + fn project(this: Wrapper<'_, Self>) -> Self::Projected<'_>; +} +trait MyTrait {} +trait ProjectedMyTrait {} + +impl<T> Project for Option<T> { + type Projected<'a> = Option<Wrapper<'a, T>> where T: 'a; + fn project(this: Wrapper<'_, Self>) -> Self::Projected<'_> { + this.0.as_ref().map(Wrapper) + } +} + +impl<T: MyTrait> MyTrait for Option<Wrapper<'_, T>> {} + +impl<T: ProjectedMyTrait> MyTrait for Wrapper<'_, T> {} + +impl<T> ProjectedMyTrait for T + where + T: Project, + for<'a> T::Projected<'a>: MyTrait, + //~^ NOTE due to current limitations in the borrow checker, this implies a `'static` lifetime + //~| NOTE due to current limitations in the borrow checker, this implies a `'static` lifetime +{} + +fn require_trait<T: MyTrait>(_: T) {} + +fn foo<T : MyTrait, U : MyTrait>(wrap: Wrapper<'_, Option<T>>, wrap1: Wrapper<'_, Option<U>>) { + //~^ HELP consider restricting the type parameter to the `'static` lifetime + //~| HELP consider restricting the type parameter to the `'static` lifetime + require_trait(wrap); + //~^ ERROR `T` does not live long enough + require_trait(wrap1); + //~^ ERROR `U` does not live long enough +} + +fn main() {} diff --git a/tests/ui/lifetimes/issue-105507.stderr b/tests/ui/lifetimes/issue-105507.stderr new file mode 100644 index 000000000..44d3a7eb9 --- /dev/null +++ b/tests/ui/lifetimes/issue-105507.stderr @@ -0,0 +1,34 @@ +error: `T` does not live long enough + --> $DIR/issue-105507.rs:37:5 + | +LL | require_trait(wrap); + | ^^^^^^^^^^^^^^^^^^^ + | +note: due to current limitations in the borrow checker, this implies a `'static` lifetime + --> $DIR/issue-105507.rs:27:35 + | +LL | for<'a> T::Projected<'a>: MyTrait, + | ^^^^^^^ +help: consider restricting the type parameter to the `'static` lifetime + | +LL | fn foo<T : MyTrait + 'static, U : MyTrait + 'static>(wrap: Wrapper<'_, Option<T>>, wrap1: Wrapper<'_, Option<U>>) { + | +++++++++ +++++++++ + +error: `U` does not live long enough + --> $DIR/issue-105507.rs:39:5 + | +LL | require_trait(wrap1); + | ^^^^^^^^^^^^^^^^^^^^ + | +note: due to current limitations in the borrow checker, this implies a `'static` lifetime + --> $DIR/issue-105507.rs:27:35 + | +LL | for<'a> T::Projected<'a>: MyTrait, + | ^^^^^^^ +help: consider restricting the type parameter to the `'static` lifetime + | +LL | fn foo<T : MyTrait + 'static, U : MyTrait + 'static>(wrap: Wrapper<'_, Option<T>>, wrap1: Wrapper<'_, Option<U>>) { + | +++++++++ +++++++++ + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/lifetimes/issue-17728.rs b/tests/ui/lifetimes/issue-17728.rs index 6aca159c4..6aca159c4 100644 --- a/src/test/ui/lifetimes/issue-17728.rs +++ b/tests/ui/lifetimes/issue-17728.rs diff --git a/src/test/ui/lifetimes/issue-17728.stderr b/tests/ui/lifetimes/issue-17728.stderr index 3b25902d7..3b25902d7 100644 --- a/src/test/ui/lifetimes/issue-17728.stderr +++ b/tests/ui/lifetimes/issue-17728.stderr diff --git a/src/test/ui/lifetimes/issue-26638.rs b/tests/ui/lifetimes/issue-26638.rs index 000ab6492..4bec3b341 100644 --- a/src/test/ui/lifetimes/issue-26638.rs +++ b/tests/ui/lifetimes/issue-26638.rs @@ -5,7 +5,7 @@ fn parse_type(iter: Box<dyn Iterator<Item=&str>+'static>) -> &str { iter.next() fn parse_type_2(iter: fn(&u8)->&u8) -> &str { iter() } //~^ ERROR missing lifetime specifier [E0106] //~| ERROR mismatched types -//~| ERROR this function takes 1 argument but 0 arguments were supplied +//~| ERROR function takes 1 argument but 0 arguments were supplied fn parse_type_3() -> &str { unimplemented!() } //~^ ERROR missing lifetime specifier [E0106] diff --git a/src/test/ui/lifetimes/issue-26638.stderr b/tests/ui/lifetimes/issue-26638.stderr index 98d39d614..98d39d614 100644 --- a/src/test/ui/lifetimes/issue-26638.stderr +++ b/tests/ui/lifetimes/issue-26638.stderr diff --git a/src/test/ui/lifetimes/issue-34979.rs b/tests/ui/lifetimes/issue-34979.rs index 252486dd9..252486dd9 100644 --- a/src/test/ui/lifetimes/issue-34979.rs +++ b/tests/ui/lifetimes/issue-34979.rs diff --git a/tests/ui/lifetimes/issue-34979.stderr b/tests/ui/lifetimes/issue-34979.stderr new file mode 100644 index 000000000..3d4208031 --- /dev/null +++ b/tests/ui/lifetimes/issue-34979.stderr @@ -0,0 +1,20 @@ +error[E0283]: type annotations needed: cannot satisfy `&'a (): Foo` + --> $DIR/issue-34979.rs:6:13 + | +LL | &'a (): Foo, + | ^^^ + | +note: multiple `impl`s or `where` clauses satisfying `&'a (): Foo` found + --> $DIR/issue-34979.rs:2:1 + | +LL | impl<'a, T> Foo for &'a T {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | &'a (): Foo, + | ^^^ +LL | &'static (): Foo; + | ^^^ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0283`. diff --git a/src/test/ui/lifetimes/issue-54378.rs b/tests/ui/lifetimes/issue-54378.rs index aa42d4a7c..aa42d4a7c 100644 --- a/src/test/ui/lifetimes/issue-54378.rs +++ b/tests/ui/lifetimes/issue-54378.rs diff --git a/src/test/ui/lifetimes/issue-55796.rs b/tests/ui/lifetimes/issue-55796.rs index a7b27a999..a7b27a999 100644 --- a/src/test/ui/lifetimes/issue-55796.rs +++ b/tests/ui/lifetimes/issue-55796.rs diff --git a/src/test/ui/lifetimes/issue-55796.stderr b/tests/ui/lifetimes/issue-55796.stderr index 5809a56cd..5809a56cd 100644 --- a/src/test/ui/lifetimes/issue-55796.stderr +++ b/tests/ui/lifetimes/issue-55796.stderr diff --git a/src/test/ui/lifetimes/issue-64173-unused-lifetimes.rs b/tests/ui/lifetimes/issue-64173-unused-lifetimes.rs index 8080dd7dc..8080dd7dc 100644 --- a/src/test/ui/lifetimes/issue-64173-unused-lifetimes.rs +++ b/tests/ui/lifetimes/issue-64173-unused-lifetimes.rs diff --git a/src/test/ui/lifetimes/issue-64173-unused-lifetimes.stderr b/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr index a487cbea5..a487cbea5 100644 --- a/src/test/ui/lifetimes/issue-64173-unused-lifetimes.stderr +++ b/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr diff --git a/src/test/ui/lifetimes/issue-67498.rs b/tests/ui/lifetimes/issue-67498.rs index 8d8826435..8d8826435 100644 --- a/src/test/ui/lifetimes/issue-67498.rs +++ b/tests/ui/lifetimes/issue-67498.rs diff --git a/src/test/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs b/tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs index b9aab2714..b9aab2714 100644 --- a/src/test/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs +++ b/tests/ui/lifetimes/issue-70917-lifetimes-in-fn-def.rs diff --git a/src/test/ui/lifetimes/issue-76168-hr-outlives-2.rs b/tests/ui/lifetimes/issue-76168-hr-outlives-2.rs index 348586fa2..348586fa2 100644 --- a/src/test/ui/lifetimes/issue-76168-hr-outlives-2.rs +++ b/tests/ui/lifetimes/issue-76168-hr-outlives-2.rs diff --git a/src/test/ui/lifetimes/issue-76168-hr-outlives.rs b/tests/ui/lifetimes/issue-76168-hr-outlives.rs index 9366e94c9..9366e94c9 100644 --- a/src/test/ui/lifetimes/issue-76168-hr-outlives.rs +++ b/tests/ui/lifetimes/issue-76168-hr-outlives.rs diff --git a/src/test/ui/lifetimes/issue-77175.rs b/tests/ui/lifetimes/issue-77175.rs index 2282752b6..2282752b6 100644 --- a/src/test/ui/lifetimes/issue-77175.rs +++ b/tests/ui/lifetimes/issue-77175.rs diff --git a/src/test/ui/lifetimes/issue-79187-2.rs b/tests/ui/lifetimes/issue-79187-2.rs index fff92c30b..fff92c30b 100644 --- a/src/test/ui/lifetimes/issue-79187-2.rs +++ b/tests/ui/lifetimes/issue-79187-2.rs diff --git a/src/test/ui/lifetimes/issue-79187-2.stderr b/tests/ui/lifetimes/issue-79187-2.stderr index c5f654b37..c5f654b37 100644 --- a/src/test/ui/lifetimes/issue-79187-2.stderr +++ b/tests/ui/lifetimes/issue-79187-2.stderr diff --git a/src/test/ui/lifetimes/issue-79187.rs b/tests/ui/lifetimes/issue-79187.rs index 8e1304562..8e1304562 100644 --- a/src/test/ui/lifetimes/issue-79187.rs +++ b/tests/ui/lifetimes/issue-79187.rs diff --git a/src/test/ui/lifetimes/issue-79187.stderr b/tests/ui/lifetimes/issue-79187.stderr index ee6e7b89d..ee6e7b89d 100644 --- a/src/test/ui/lifetimes/issue-79187.stderr +++ b/tests/ui/lifetimes/issue-79187.stderr diff --git a/src/test/ui/lifetimes/issue-83737-binders-across-types.rs b/tests/ui/lifetimes/issue-83737-binders-across-types.rs index e130561e4..e130561e4 100644 --- a/src/test/ui/lifetimes/issue-83737-binders-across-types.rs +++ b/tests/ui/lifetimes/issue-83737-binders-across-types.rs diff --git a/src/test/ui/lifetimes/issue-83737-erasing-bound-vars.rs b/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs index c496a3556..c496a3556 100644 --- a/src/test/ui/lifetimes/issue-83737-erasing-bound-vars.rs +++ b/tests/ui/lifetimes/issue-83737-erasing-bound-vars.rs diff --git a/src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs index 7f0ea730d..7f0ea730d 100644 --- a/src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs +++ b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.rs diff --git a/src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr index f7bdee633..f7bdee633 100644 --- a/src/test/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr +++ b/tests/ui/lifetimes/issue-83753-invalid-associated-type-supertrait-hrtb.stderr diff --git a/src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.rs b/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs index 604687ce7..604687ce7 100644 --- a/src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.rs +++ b/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.rs diff --git a/src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr b/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr index e57933da5..e57933da5 100644 --- a/src/test/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr +++ b/tests/ui/lifetimes/issue-83907-invalid-fn-like-path.stderr diff --git a/src/test/ui/lifetimes/issue-84398.rs b/tests/ui/lifetimes/issue-84398.rs index 1912fa59b..1912fa59b 100644 --- a/src/test/ui/lifetimes/issue-84398.rs +++ b/tests/ui/lifetimes/issue-84398.rs diff --git a/src/test/ui/lifetimes/issue-84604.rs b/tests/ui/lifetimes/issue-84604.rs index b315ef051..b315ef051 100644 --- a/src/test/ui/lifetimes/issue-84604.rs +++ b/tests/ui/lifetimes/issue-84604.rs diff --git a/src/test/ui/lifetimes/issue-90170-elision-mismatch.fixed b/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed index bd85da1a7..bd85da1a7 100644 --- a/src/test/ui/lifetimes/issue-90170-elision-mismatch.fixed +++ b/tests/ui/lifetimes/issue-90170-elision-mismatch.fixed diff --git a/src/test/ui/lifetimes/issue-90170-elision-mismatch.rs b/tests/ui/lifetimes/issue-90170-elision-mismatch.rs index 3c495368b..3c495368b 100644 --- a/src/test/ui/lifetimes/issue-90170-elision-mismatch.rs +++ b/tests/ui/lifetimes/issue-90170-elision-mismatch.rs diff --git a/src/test/ui/lifetimes/issue-90170-elision-mismatch.stderr b/tests/ui/lifetimes/issue-90170-elision-mismatch.stderr index 48fb3fb4a..48fb3fb4a 100644 --- a/src/test/ui/lifetimes/issue-90170-elision-mismatch.stderr +++ b/tests/ui/lifetimes/issue-90170-elision-mismatch.stderr diff --git a/src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.rs b/tests/ui/lifetimes/issue-90600-expected-return-static-indirect.rs index ce4cddc9b..ce4cddc9b 100644 --- a/src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.rs +++ b/tests/ui/lifetimes/issue-90600-expected-return-static-indirect.rs diff --git a/src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr b/tests/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr index 99e1e7217..99e1e7217 100644 --- a/src/test/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr +++ b/tests/ui/lifetimes/issue-90600-expected-return-static-indirect.stderr diff --git a/src/test/ui/lifetimes/issue-91763.rs b/tests/ui/lifetimes/issue-91763.rs index 2e8807fe6..2e8807fe6 100644 --- a/src/test/ui/lifetimes/issue-91763.rs +++ b/tests/ui/lifetimes/issue-91763.rs diff --git a/src/test/ui/lifetimes/issue-91763.stderr b/tests/ui/lifetimes/issue-91763.stderr index 6ccf008c0..6ccf008c0 100644 --- a/src/test/ui/lifetimes/issue-91763.stderr +++ b/tests/ui/lifetimes/issue-91763.stderr diff --git a/src/test/ui/lifetimes/issue-95023.rs b/tests/ui/lifetimes/issue-95023.rs index 3fba8c00c..3fba8c00c 100644 --- a/src/test/ui/lifetimes/issue-95023.rs +++ b/tests/ui/lifetimes/issue-95023.rs diff --git a/src/test/ui/lifetimes/issue-95023.stderr b/tests/ui/lifetimes/issue-95023.stderr index 35c3797c7..35c3797c7 100644 --- a/src/test/ui/lifetimes/issue-95023.stderr +++ b/tests/ui/lifetimes/issue-95023.stderr diff --git a/src/test/ui/lifetimes/issue-97193.rs b/tests/ui/lifetimes/issue-97193.rs index 6c82c29dd..6c82c29dd 100644 --- a/src/test/ui/lifetimes/issue-97193.rs +++ b/tests/ui/lifetimes/issue-97193.rs diff --git a/src/test/ui/lifetimes/issue-97193.stderr b/tests/ui/lifetimes/issue-97193.stderr index 21be543cc..21be543cc 100644 --- a/src/test/ui/lifetimes/issue-97193.stderr +++ b/tests/ui/lifetimes/issue-97193.stderr diff --git a/src/test/ui/lifetimes/issue-97194.rs b/tests/ui/lifetimes/issue-97194.rs index 5f3560dbe..5f3560dbe 100644 --- a/src/test/ui/lifetimes/issue-97194.rs +++ b/tests/ui/lifetimes/issue-97194.rs diff --git a/src/test/ui/lifetimes/issue-97194.stderr b/tests/ui/lifetimes/issue-97194.stderr index 93bde285a..93bde285a 100644 --- a/src/test/ui/lifetimes/issue-97194.stderr +++ b/tests/ui/lifetimes/issue-97194.stderr diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs b/tests/ui/lifetimes/lifetime-bound-will-change-warning.rs index 0d0303705..0d0303705 100644 --- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.rs +++ b/tests/ui/lifetimes/lifetime-bound-will-change-warning.rs diff --git a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr b/tests/ui/lifetimes/lifetime-bound-will-change-warning.stderr index c51580f28..c51580f28 100644 --- a/src/test/ui/lifetimes/lifetime-bound-will-change-warning.stderr +++ b/tests/ui/lifetimes/lifetime-bound-will-change-warning.stderr diff --git a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.rs b/tests/ui/lifetimes/lifetime-doesnt-live-long-enough.rs index d2b782c92..d2b782c92 100644 --- a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.rs +++ b/tests/ui/lifetimes/lifetime-doesnt-live-long-enough.rs diff --git a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr b/tests/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr index affb4e8d0..affb4e8d0 100644 --- a/src/test/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr +++ b/tests/ui/lifetimes/lifetime-doesnt-live-long-enough.stderr diff --git a/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.rs b/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.rs index d0a8fe795..d0a8fe795 100644 --- a/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.rs +++ b/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.rs diff --git a/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr b/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr index 5eee953ef..5eee953ef 100644 --- a/src/test/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr +++ b/tests/ui/lifetimes/lifetime-elision-return-type-requires-explicit-lifetime.stderr diff --git a/src/test/ui/lifetimes/lifetime-elision-return-type-trait.rs b/tests/ui/lifetimes/lifetime-elision-return-type-trait.rs index 5168cb20d..5168cb20d 100644 --- a/src/test/ui/lifetimes/lifetime-elision-return-type-trait.rs +++ b/tests/ui/lifetimes/lifetime-elision-return-type-trait.rs diff --git a/src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr b/tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr index ef1127c59..ef1127c59 100644 --- a/src/test/ui/lifetimes/lifetime-elision-return-type-trait.stderr +++ b/tests/ui/lifetimes/lifetime-elision-return-type-trait.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.rs b/tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.rs index b0c09c751..b0c09c751 100644 --- a/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.rs +++ b/tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr b/tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr index 63d00875d..63d00875d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr +++ b/tests/ui/lifetimes/lifetime-errors/42701_one_named_and_one_anonymous.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.rs b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.rs index 35f70dd19..35f70dd19 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr index 64aa8361c..64aa8361c 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-early-bound-in-struct.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.rs b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.rs index 9b15b378d..9b15b378d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr index b40481ecd..b40481ecd 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-2.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.rs b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.rs index 6b062125c..6b062125c 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr index 194fd9589..194fd9589 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-3.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.rs b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.rs index 7bc3fa623..7bc3fa623 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr index 64f4bd0fc..64f4bd0fc 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.rs b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.rs index a1126d6bb..a1126d6bb 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr index 961f9de66..961f9de66 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.rs b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.rs index f0d73deb3..f0d73deb3 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr index 5bb763813..5bb763813 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.rs b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.rs index f72d567bb..f72d567bb 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr index 29a706957..29a706957 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.rs b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.rs index 49993aca3..49993aca3 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr index 4bcd7cf95..4bcd7cf95 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.rs b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.rs index 63d81a57d..63d81a57d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr index 34a64f8a6..34a64f8a6 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.rs b/tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.rs index d6c918843..d6c918843 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr b/tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr index bcc3e9510..bcc3e9510 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex1b-return-no-names-if-else.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.rs b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.rs index 998a48ce2..998a48ce2 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr index 90d4754eb..90d4754eb 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs index d18b50d0d..d18b50d0d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr index a03e16b3b..a03e16b3b 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.rs b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.rs index 5188ea1cc..5188ea1cc 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr index 487b34e3d..487b34e3d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.rs b/tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.rs index 27424d79b..27424d79b 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr b/tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr index 1622ce422..1622ce422 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.rs b/tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.rs index 2236d78ef..2236d78ef 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr b/tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr index 99fab4631..99fab4631 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.rs b/tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.rs index f57323029..f57323029 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr index 52c5752f6..52c5752f6 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.rs b/tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.rs index 4a934bbf0..4a934bbf0 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr index e90c81ee3..e90c81ee3 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.rs index 09ee9accc..09ee9accc 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr index 5a23f1e0e..5a23f1e0e 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs index b3106db77..b3106db77 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr index 6ba130308..6ba130308 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.rs index 5d0367783..5d0367783 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr index 4c0ffe5c0..4c0ffe5c0 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.rs index 4a479f19c..4a479f19c 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr index 97c665347..97c665347 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs index 9b8cfe670..9b8cfe670 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr index b3d0bc2b8..b3d0bc2b8 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.rs index db934a0be..db934a0be 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr index fbe98a426..fbe98a426 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.rs index 4bf5db41f..4bf5db41f 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr index 9630729d0..9630729d0 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.rs index 8dcb814b2..8dcb814b2 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr index 1e24032fc..1e24032fc 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.rs index e4df870bc..e4df870bc 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr index bbd62902d..bbd62902d 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.rs index 00de48278..00de48278 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr index 79e7e8e15..79e7e8e15 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.rs index 00de48278..00de48278 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr index 53615fd1a..53615fd1a 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.rs index 5bb0e28d4..5bb0e28d4 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr index 6ff441167..6ff441167 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs index 3ffd7be4e..3ffd7be4e 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr index 5601335d2..5601335d2 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs index 9b67a7742..9b67a7742 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr index e221902c4..e221902c4 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.rs index 2f67750d8..2f67750d8 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr index a909c5fa8..cc2447b18 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.stderr @@ -16,10 +16,13 @@ LL | fn foo<'a>(x:fn(&u8, &u8), y: Vec<&'a u8>, z: &'a u8) { error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable --> $DIR/ex3-both-anon-regions-using-fn-items.rs:2:3 | -LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { - | - help: consider changing this to be mutable: `mut y` LL | y.push(z); | ^^^^^^^^^ cannot borrow as mutable + | +help: consider changing this to be mutable + | +LL | fn foo(x:fn(&u8, &u8), mut y: Vec<&u8>, z: &u8) { + | +++ error: aborting due to 2 previous errors diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs index 73e1789f2..73e1789f2 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr index 9661f1e51..9661f1e51 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs index 97fa9ef91..97fa9ef91 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr index d85ea6529..2ba5afa80 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.stderr @@ -16,10 +16,13 @@ LL | fn foo<'a>(x:Box<dyn Fn(&u8, &u8)> , y: Vec<&'a u8>, z: &'a u8) { error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:2:3 | -LL | fn foo(x:Box<dyn Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) { - | - help: consider changing this to be mutable: `mut y` LL | y.push(z); | ^^^^^^^^^ cannot borrow as mutable + | +help: consider changing this to be mutable + | +LL | fn foo(x:Box<dyn Fn(&u8, &u8)> , mut y: Vec<&u8>, z: &u8) { + | +++ error: aborting due to 2 previous errors diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.rs b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.rs index ca0feaba8..ca0feaba8 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.rs +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr index ec9fac0c2..ec9fac0c2 100644 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr +++ b/tests/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/issue_74400.rs b/tests/ui/lifetimes/lifetime-errors/issue_74400.rs index ddb8bacce..ddb8bacce 100644 --- a/src/test/ui/lifetimes/lifetime-errors/issue_74400.rs +++ b/tests/ui/lifetimes/lifetime-errors/issue_74400.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/issue_74400.stderr b/tests/ui/lifetimes/lifetime-errors/issue_74400.stderr index 7049f28e2..7049f28e2 100644 --- a/src/test/ui/lifetimes/lifetime-errors/issue_74400.stderr +++ b/tests/ui/lifetimes/lifetime-errors/issue_74400.stderr diff --git a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs b/tests/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs index 81a20c587..81a20c587 100644 --- a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs +++ b/tests/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.rs diff --git a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr b/tests/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr index b47a47d63..b47a47d63 100644 --- a/src/test/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr +++ b/tests/ui/lifetimes/lifetime-errors/liveness-assign-imm-local-notes.stderr diff --git a/src/test/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.rs b/tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.rs index 2ce1a0f45..2ce1a0f45 100644 --- a/src/test/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.rs +++ b/tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.rs diff --git a/src/test/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr b/tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr index 3040a8512..9c61d5a0c 100644 --- a/src/test/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr +++ b/tests/ui/lifetimes/lifetime-mismatch-between-trait-and-impl.stderr @@ -7,8 +7,8 @@ LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32; LL | fn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&'1 i32, &'1 i32) -> &'1 i32` | - = note: expected `fn(&'1 i32, &'a i32) -> &'a i32` - found `fn(&'1 i32, &'1 i32) -> &'1 i32` + = note: expected signature `fn(&'1 i32, &'a i32) -> &'a i32` + found signature `fn(&'1 i32, &'1 i32) -> &'1 i32` = help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait` = help: verify the lifetime relationships in the `trait` and `impl` between the `self` argument, the other inputs and its output diff --git a/src/test/ui/lifetimes/lifetime-no-keyword.rs b/tests/ui/lifetimes/lifetime-no-keyword.rs index f466f44f5..f466f44f5 100644 --- a/src/test/ui/lifetimes/lifetime-no-keyword.rs +++ b/tests/ui/lifetimes/lifetime-no-keyword.rs diff --git a/src/test/ui/lifetimes/lifetime-no-keyword.stderr b/tests/ui/lifetimes/lifetime-no-keyword.stderr index ba8ceb80f..ba8ceb80f 100644 --- a/src/test/ui/lifetimes/lifetime-no-keyword.stderr +++ b/tests/ui/lifetimes/lifetime-no-keyword.stderr diff --git a/src/test/ui/lifetimes/missing-lifetime-in-alias.rs b/tests/ui/lifetimes/missing-lifetime-in-alias.rs index 51c564c01..51c564c01 100644 --- a/src/test/ui/lifetimes/missing-lifetime-in-alias.rs +++ b/tests/ui/lifetimes/missing-lifetime-in-alias.rs diff --git a/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr b/tests/ui/lifetimes/missing-lifetime-in-alias.stderr index 428b8f14b..20159e144 100644 --- a/src/test/ui/lifetimes/missing-lifetime-in-alias.stderr +++ b/tests/ui/lifetimes/missing-lifetime-in-alias.stderr @@ -39,7 +39,7 @@ LL | type Bar<'b> help: add missing lifetime argument | LL | type C<'a, 'b> = <A<'a> as Trait>::Bar<'a>; - | ~~~~~~~ + | ++++ error: aborting due to 3 previous errors diff --git a/src/test/ui/lifetimes/nested-binder-print.rs b/tests/ui/lifetimes/nested-binder-print.rs index f97f349fd..f97f349fd 100644 --- a/src/test/ui/lifetimes/nested-binder-print.rs +++ b/tests/ui/lifetimes/nested-binder-print.rs diff --git a/src/test/ui/lifetimes/nested-binder-print.stderr b/tests/ui/lifetimes/nested-binder-print.stderr index 32dd89693..32dd89693 100644 --- a/src/test/ui/lifetimes/nested-binder-print.stderr +++ b/tests/ui/lifetimes/nested-binder-print.stderr diff --git a/src/test/ui/lifetimes/nested.rs b/tests/ui/lifetimes/nested.rs index f3f1f2016..f3f1f2016 100644 --- a/src/test/ui/lifetimes/nested.rs +++ b/tests/ui/lifetimes/nested.rs diff --git a/src/test/ui/lifetimes/re-empty-in-error.rs b/tests/ui/lifetimes/re-empty-in-error.rs index 554028a96..554028a96 100644 --- a/src/test/ui/lifetimes/re-empty-in-error.rs +++ b/tests/ui/lifetimes/re-empty-in-error.rs diff --git a/src/test/ui/lifetimes/re-empty-in-error.stderr b/tests/ui/lifetimes/re-empty-in-error.stderr index c35d8ecec..c35d8ecec 100644 --- a/src/test/ui/lifetimes/re-empty-in-error.stderr +++ b/tests/ui/lifetimes/re-empty-in-error.stderr diff --git a/src/test/ui/lifetimes/shadow.rs b/tests/ui/lifetimes/shadow.rs index e2124887e..e2124887e 100644 --- a/src/test/ui/lifetimes/shadow.rs +++ b/tests/ui/lifetimes/shadow.rs diff --git a/src/test/ui/lifetimes/shadow.stderr b/tests/ui/lifetimes/shadow.stderr index b834e90d8..b834e90d8 100644 --- a/src/test/ui/lifetimes/shadow.stderr +++ b/tests/ui/lifetimes/shadow.stderr diff --git a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed new file mode 100644 index 000000000..f977f0bd3 --- /dev/null +++ b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.fixed @@ -0,0 +1,13 @@ +// run-rustfix + +#![allow(warnings)] + +fn no_restriction<'a, T: 'a>(x: &'a ()) -> &() { + with_restriction::<T>(x) //~ ERROR the parameter type `T` may not live long enough +} + +fn with_restriction<'b, T: 'b>(x: &'b ()) -> &'b () { + x +} + +fn main() {} diff --git a/src/test/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs index 645bc7db0..d6ce112ec 100644 --- a/src/test/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs +++ b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.rs @@ -1,3 +1,7 @@ +// run-rustfix + +#![allow(warnings)] + fn no_restriction<T>(x: &()) -> &() { with_restriction::<T>(x) //~ ERROR the parameter type `T` may not live long enough } diff --git a/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.stderr b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.stderr new file mode 100644 index 000000000..2d58d3a02 --- /dev/null +++ b/tests/ui/lifetimes/suggest-introducing-and-adding-missing-lifetime.stderr @@ -0,0 +1,24 @@ +error[E0311]: the parameter type `T` may not live long enough + --> $DIR/suggest-introducing-and-adding-missing-lifetime.rs:6:5 + | +LL | with_restriction::<T>(x) + | ^^^^^^^^^^^^^^^^^^^^^ + | +note: the parameter type `T` must be valid for the anonymous lifetime defined here... + --> $DIR/suggest-introducing-and-adding-missing-lifetime.rs:5:25 + | +LL | fn no_restriction<T>(x: &()) -> &() { + | ^^^ +note: ...so that the type `T` will meet its required lifetime bounds + --> $DIR/suggest-introducing-and-adding-missing-lifetime.rs:6:5 + | +LL | with_restriction::<T>(x) + | ^^^^^^^^^^^^^^^^^^^^^ +help: consider adding an explicit lifetime bound... + | +LL | fn no_restriction<'a, T: 'a>(x: &'a ()) -> &() { + | +++ ++++ ++ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0311`. diff --git a/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs b/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs index cc29f9de7..cc29f9de7 100644 --- a/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs +++ b/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.rs diff --git a/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr b/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr index 0d6ade415..0d6ade415 100644 --- a/src/test/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr +++ b/tests/ui/lifetimes/undeclared-lifetime-used-in-debug-macro-issue-70152.stderr diff --git a/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs b/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs index 8deb36551..8deb36551 100644 --- a/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs +++ b/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.rs diff --git a/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr b/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr index 439904509..439904509 100644 --- a/src/test/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr +++ b/tests/ui/lifetimes/unnamed-closure-doesnt-life-long-enough-issue-67634.stderr diff --git a/src/test/ui/lifetimes/unusual-rib-combinations.rs b/tests/ui/lifetimes/unusual-rib-combinations.rs index b4c86aab8..b4c86aab8 100644 --- a/src/test/ui/lifetimes/unusual-rib-combinations.rs +++ b/tests/ui/lifetimes/unusual-rib-combinations.rs diff --git a/src/test/ui/lifetimes/unusual-rib-combinations.stderr b/tests/ui/lifetimes/unusual-rib-combinations.stderr index 6d7b42506..6d7b42506 100644 --- a/src/test/ui/lifetimes/unusual-rib-combinations.stderr +++ b/tests/ui/lifetimes/unusual-rib-combinations.stderr |