about summary refs log tree commit diff
path: root/tests/rustdoc-ui
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-11-23 18:32:10 +0000
committerMichael Goulet <michael@errs.io>2024-11-23 23:31:30 +0000
commitcfa8fcbf581c8c311e079b04517cbe979d9beb7b (patch)
treeef8f35d148daf7787be7b284b2a7da5f8c0aa404 /tests/rustdoc-ui
parent898ccdb75426f5fb5c58e8057a83d015640613b8 (diff)
downloadrust-cfa8fcbf581c8c311e079b04517cbe979d9beb7b.tar.gz
rust-cfa8fcbf581c8c311e079b04517cbe979d9beb7b.zip
Dont create trait object if it has errors in it
Diffstat (limited to 'tests/rustdoc-ui')
-rw-r--r--tests/rustdoc-ui/unable-fulfill-trait.rs1
-rw-r--r--tests/rustdoc-ui/unable-fulfill-trait.stderr13
2 files changed, 3 insertions, 11 deletions
diff --git a/tests/rustdoc-ui/unable-fulfill-trait.rs b/tests/rustdoc-ui/unable-fulfill-trait.rs
index 4edc7ab76c1..49dce32072b 100644
--- a/tests/rustdoc-ui/unable-fulfill-trait.rs
+++ b/tests/rustdoc-ui/unable-fulfill-trait.rs
@@ -3,7 +3,6 @@
 pub struct Foo<'a, 'b, T> {
     field1: dyn Bar<'a, 'b>,
     //~^ ERROR
-    //~| ERROR
 }
 
 pub trait Bar<'x, 's, U>
diff --git a/tests/rustdoc-ui/unable-fulfill-trait.stderr b/tests/rustdoc-ui/unable-fulfill-trait.stderr
index 12e53546cda..2786a005cd1 100644
--- a/tests/rustdoc-ui/unable-fulfill-trait.stderr
+++ b/tests/rustdoc-ui/unable-fulfill-trait.stderr
@@ -5,7 +5,7 @@ LL |     field1: dyn Bar<'a, 'b>,
    |                 ^^^ expected 1 generic argument
    |
 note: trait defined here, with 1 generic parameter: `U`
-  --> $DIR/unable-fulfill-trait.rs:9:11
+  --> $DIR/unable-fulfill-trait.rs:8:11
    |
 LL | pub trait Bar<'x, 's, U>
    |           ^^^         -
@@ -14,13 +14,6 @@ help: add missing generic argument
 LL |     field1: dyn Bar<'a, 'b, U>,
    |                           +++
 
-error[E0227]: ambiguous lifetime bound, explicit lifetime bound required
-  --> $DIR/unable-fulfill-trait.rs:4:13
-   |
-LL |     field1: dyn Bar<'a, 'b>,
-   |             ^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
+error: aborting due to 1 previous error
 
-Some errors have detailed explanations: E0107, E0227.
-For more information about an error, try `rustc --explain E0107`.
+For more information about this error, try `rustc --explain E0107`.