rust icon indicating copy to clipboard operation
rust copied to clipboard

Re-add HRTB implied static bug note

Open jackh726 opened this issue 1 year ago • 6 comments

r? @compiler-errors since you reviewed it previously

I deleted a normalize call and forgot about it. Whoops.

jackh726 avatar Sep 17 '22 00:09 jackh726

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

rustbot avatar Sep 17 '22 00:09 rustbot

Going to beta nominate this for 1.65. It would be nice to have this note alongside the GATs stabilization.

jackh726 avatar Sep 17 '22 00:09 jackh726

The job x86_64-gnu-llvm-13 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

---- [ui] src/test/ui/generic-associated-types/bugs/hrtb-implied-1.rs stdout ----
diff of stderr:

8    |     -------------------------------------- argument requires that borrow lasts for `'static`
9 LL | }
10    | - temporary value is freed at the end of this statement
-    |
- note: due to current limitations in the borrow checker, this implies a `'static` lifetime
-   --> $DIR/hrtb-implied-1.rs:26:26
-    |
- LL |     for<'a> I::Item<'a>: Debug,
17 
18 error: aborting due to previous error
19 



The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generic-associated-types/bugs/hrtb-implied-1/hrtb-implied-1.stderr
To only update this specific test, also pass `--test-args generic-associated-types/bugs/hrtb-implied-1.rs`

error: 1 errors occurred comparing output.
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/generic-associated-types/bugs/hrtb-implied-1.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generic-associated-types/bugs/hrtb-implied-1" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/generic-associated-types/bugs/hrtb-implied-1/auxiliary"
stdout: none
--- stderr -------------------------------
  --> /checkout/src/test/ui/generic-associated-types/bugs/hrtb-implied-1.rs:31:22
   |
LL |     let slice = &mut ();
   |                      ^^ creates a temporary which is freed while still in use
   |                      ^^ creates a temporary which is freed while still in use
...
LL |     print_items::<WindowsMut<'_>>(windows);
   |     -------------------------------------- argument requires that borrow lasts for `'static`
LL | }
   | - temporary value is freed at the end of this statement
error: aborting due to previous error

For more information about this error, try `rustc --explain E0716`.
------------------------------------------

rust-log-analyzer avatar Sep 17 '22 00:09 rust-log-analyzer

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
configure: rust.debug-assertions := True
configure: rust.overflow-checks := True
configure: llvm.assertions      := True
configure: dist.missing-tools   := True
configure: build.configure-args := ['--enable-sccache', '--disable-manage-submodu ...
configure: writing `config.toml` in current directory
configure: 
configure: run `python /checkout/x.py --help`
Attempting with retry: make prepare
---
skip untracked path cpu-usage.csv during rustfmt invocations
skip untracked path src/doc/book/ during rustfmt invocations
skip untracked path src/doc/rust-by-example/ during rustfmt invocations
skip untracked path src/llvm-project/ during rustfmt invocations
Diff in /checkout/compiler/rustc_traits/src/type_op.rs at line 93:
         T: TypeFoldable<'tcx>,
         self.infcx
         self.infcx
-            .partially_normalize_associated_types_in(
-                cause,
-                self.param_env,
-            )
-            )
+            .partially_normalize_associated_types_in(cause, self.param_env, value)
             .into_value_registering_obligations(self.infcx, self.fulfill_cx)
 
Diff in /checkout/compiler/rustc_traits/src/type_op.rs at line 167:
                 hir::CRATE_HIR_ID,
                 hir::CRATE_HIR_ID,
                 ObligationCauseCode::AscribeUserTypeProvePredicate(predicate_span),
             );
-            let instantiated_predicate = self.normalize_with_cause(instantiated_predicate, cause.clone());
+            let instantiated_predicate =
+                self.normalize_with_cause(instantiated_predicate, cause.clone());
             self.prove_predicate(instantiated_predicate, cause);
 
 
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/rustc_traits/src/type_op.rs" "/checkout/compiler/rustc_traits/src/implied_outlives_bounds.rs" "/checkout/compiler/rustc_traits/src/lib.rs" "/checkout/compiler/rustc_traits/src/chalk/db.rs" "/checkout/compiler/rustc_traits/src/normalize_projection_ty.rs" "/checkout/compiler/rustc_traits/src/chalk/lowering.rs" "/checkout/compiler/rustc_traits/src/normalize_erasing_regions.rs" "/checkout/compiler/rustc_traits/src/dropck_outlives.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.

rust-log-analyzer avatar Sep 17 '22 15:09 rust-log-analyzer

@bors r+

compiler-errors avatar Sep 18 '22 19:09 compiler-errors

:pushpin: Commit e7ca6e1b47ce31ad544cd8f0eb7e5cd47b325e63 has been approved by compiler-errors

It is now in the queue for this repository.

bors avatar Sep 18 '22 19:09 bors

:hourglass: Testing commit e7ca6e1b47ce31ad544cd8f0eb7e5cd47b325e63 with merge efa717bc2d82c19c6957f362a936a6f95169d138...

bors avatar Sep 19 '22 04:09 bors

:sunny: Test successful - checks-actions Approved by: compiler-errors Pushing efa717bc2d82c19c6957f362a936a6f95169d138 to master...

bors avatar Sep 19 '22 07:09 bors

Finished benchmarking commit (efa717bc2d82c19c6957f362a936a6f95169d138): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean[^1] range count[^2]
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 1

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean[^1] range count[^2]
Regressions ❌
(primary)
1.2% [0.8%, 1.7%] 9
Regressions ❌
(secondary)
3.4% [3.4%, 3.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% [-3.0%, -3.0%] 1
All ❌✅ (primary) 1.2% [0.8%, 1.7%] 9

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean[^1] range count[^2]
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.7% [-1.7%, -1.7%] 1
Improvements ✅
(secondary)
-2.4% [-3.1%, -1.8%] 15
All ❌✅ (primary) -1.7% [-1.7%, -1.7%] 1

[^1]: the arithmetic mean of the percent change [^2]: number of relevant changes

rust-timer avatar Sep 19 '22 08:09 rust-timer

Beta backport approved as per compiler team on Zulip

@rustbot label +beta-accepted

apiraino avatar Sep 22 '22 14:09 apiraino