summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr')
-rw-r--r--src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr b/src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr
new file mode 100644
index 000000000..ba6af8f15
--- /dev/null
+++ b/src/test/ui/suggestions/imm-ref-trait-object-literal-bound-regions.stderr
@@ -0,0 +1,20 @@
+error[E0277]: the trait bound `for<'b> &'b S: Trait` is not satisfied
+ --> $DIR/imm-ref-trait-object-literal-bound-regions.rs:17:5
+ |
+LL | foo::<S>(s);
+ | ^^^^^^^^ the trait `for<'b> Trait` is not implemented for `&'b S`
+ |
+ = help: the trait `Trait` is implemented for `&'a mut S`
+ = note: `for<'b> Trait` is implemented for `&'b mut S`, but not for `&'b S`
+note: required by a bound in `foo`
+ --> $DIR/imm-ref-trait-object-literal-bound-regions.rs:11:20
+ |
+LL | fn foo<X>(_: X)
+ | --- required by a bound in this
+LL | where
+LL | for<'b> &'b X: Trait,
+ | ^^^^^ required by this bound in `foo`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.