jiebi/CodeConvo huggingface dataset:
Code change:
When working on Miri I noticed "portable-atomics" gets rebuilt every time I switch between a check-build and actutally running tests. This boils down to being different between the two invocations: in check builds it contains but in test builds it does not. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Cc
HEAD: ! Seems working fine here.
I'll have to try if I can till reproduce. But note that I mentioned "test build" above, so this would be vs .
Yeah I can still reproduce the problems with those invocations. (It's not the latest master but recent enough: .) Sorry for not giving the exact commands in the issue description.
I missed the tests part, sorry. I just reproduce it too. I will be working on it by the coming week. claim

Related discussion:
text: cargo.arg("--all-targets"); } <del> // Enable internal lints for clippy and rustdoc // NOTE: this doesn't enable lints for any other tools unless they explicitly add `#![warn(rustc::internal)]` // See https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776 cargo.rustflag("-Zunstable-options"); </del> let _guard = builder.msg_check(&concat!(stringify!($name), " artifacts").to_lowercase(), target); run_cargo( builder,
Code change:
When working on Miri I noticed "portable-atomics" gets rebuilt every time I switch between a check-build and actutally running tests. This boils down to being different between the two invocations: in check builds it contains but in test builds it does not. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Cc
HEAD: ! Seems working fine here.
I'll have to try if I can till reproduce. But note that I mentioned "test build" above, so this would be vs .
Yeah I can still reproduce the problems with those invocations. (It's not the latest master but recent enough: .) Sorry for not giving the exact commands in the issue description.
I missed the tests part, sorry. I just reproduce it too. I will be working on it by the coming week. claim

Related discussion:
text: if !features.is_empty() { cargo.arg("--features").arg(&features.join(", ")); } <ins> // Enable internal lints for clippy and rustdoc // NOTE: this doesn't enable lints for any other tools unless they explicitly add `#![warn(rustc::internal)]` // See https://github.com/rust-lang/rust/pull/80573#issuecomment-754010776 // // NOTE: We unconditionally set this here to avoid recompiling tools between `x check $tool` // and `x test $tool` executions. // See https://github.com/rust-lang/rust/issues/116538 cargo.rustflag("-Zunstable-options"); </ins> cargo }
Code change:
File: reduced: original: Version information Command: Program output:
cc
Some notes dump: the original test fuzzed into this MCVE is . NLLs and do compute the same scopes on that original difference in scopes here is on a somewhat ambiguous case in the current implementation: the loan ultimately flows into via member constraints, not a regular outlives constraint. NLL still computes a scope for it, doesn't since it considers the loan to escape the we ignored the member constraint here and computed the scope anyways, it would result in the same results as NLLs and not trigger the assert. A handful of other tests would then fail of SCC member constraints difference between this test and these other 4 seems to me to be about applied member constraints. That is, in this test the member constraint is likely not applied, so maybe the loan should only be considered to escape via these. We had discussed this very subject before, but thought the distinction didn't matter for the purpose of computing scopes -- maybe we were wrong in these edge cases. That should be a correct fix and should work on these 5 tests. So I'll look into that next.

Related discussion:
text: loan_issued_at: Location, ) { let sccs = self.regioncx.constraint_sccs(); <ins> let universal_regions = self.regioncx.universal_regions(); </ins> let issuing_region_scc = sccs.scc(issuing_region); // We first handle the cases where the loan doesn't go out of scope, depending on the issuing // region's successors. for scc in sccs.depth_first_search(issuing_region_scc) { <del> // 1. Via member constraints </del> <ins> // 1. Via applied member constraints </ins> // // The issuing region can flow into the choice regions, and they are either: // - placeholders or free regions themselves, // - or also transitively outlive a free region. // <del> // That is to say, if there are member constraints here, the loan escapes the function // and cannot go out of scope. We can early return. if self.regioncx.scc_has_member_constraints(scc) { return; </del> <ins> // That is to say, if there are applied member constraints here, the loan escapes the // function and cannot go out of scope. We could early return here. // // For additional insurance via fuzzing and crater, we verify that the constraint's min // choice indeed escapes the function. In the future, we could e.g. turn this check into // a debug assert and early return as an optimization. for constraint in self.regioncx.applied_member_constraints(scc) { if universal_regions.is_universal_region(constraint.min_choice) { return; } </ins> } // 2. Via regions that are live at all points: placeholders and free regions.
Code change:
File: reduced: original: Version information Command: Program output:
cc
Some notes dump: the original test fuzzed into this MCVE is . NLLs and do compute the same scopes on that original difference in scopes here is on a somewhat ambiguous case in the current implementation: the loan ultimately flows into via member constraints, not a regular outlives constraint. NLL still computes a scope for it, doesn't since it considers the loan to escape the we ignored the member constraint here and computed the scope anyways, it would result in the same results as NLLs and not trigger the assert. A handful of other tests would then fail of SCC member constraints difference between this test and these other 4 seems to me to be about applied member constraints. That is, in this test the member constraint is likely not applied, so maybe the loan should only be considered to escape via these. We had discussed this very subject before, but thought the distinction didn't matter for the purpose of computing scopes -- maybe we were wrong in these edge cases. That should be a correct fix and should work on these 5 tests. So I'll look into that next.

Related discussion:
text: let mut polonius_prec = PoloniusOutOfScopePrecomputer::new(body, regioncx); for (loan_idx, loan_data) in borrow_set.iter_enumerated() { let issuing_region = loan_data.region; <del> let issued_location = loan_data.reserve_location; </del> <ins> let loan_issued_at = loan_data.reserve_location; </ins> polonius_prec.precompute_loans_out_of_scope( loan_idx, issuing_region, <del> issued_location, </del> <ins> loan_issued_at, </ins> ); }
Code change:
File: reduced: original: Version information Command: Program output:
cc
Some notes dump: the original test fuzzed into this MCVE is . NLLs and do compute the same scopes on that original difference in scopes here is on a somewhat ambiguous case in the current implementation: the loan ultimately flows into via member constraints, not a regular outlives constraint. NLL still computes a scope for it, doesn't since it considers the loan to escape the we ignored the member constraint here and computed the scope anyways, it would result in the same results as NLLs and not trigger the assert. A handful of other tests would then fail of SCC member constraints difference between this test and these other 4 seems to me to be about applied member constraints. That is, in this test the member constraint is likely not applied, so maybe the loan should only be considered to escape via these. We had discussed this very subject before, but thought the distinction didn't matter for the purpose of computing scopes -- maybe we were wrong in these edge cases. That should be a correct fix and should work on these 5 tests. So I'll look into that next.

Related discussion:
text: self.scc_universes[scc] } <del> /// Once region solving has completed, this function will return /// the member constraints that were applied to the value of a given /// region `r`. See `AppliedMemberConstraint`. pub(crate) fn applied_member_constraints(&self, r: RegionVid) -> &[AppliedMemberConstraint] { let scc = self.constraint_sccs.scc(r); </del> <ins> /// Once region solving has completed, this function will return the member constraints that /// were applied to the value of a given SCC `scc`. See `AppliedMemberConstraint`. pub(crate) fn applied_member_constraints( &self, scc: ConstraintSccIndex, ) -> &[AppliedMemberConstraint] { </ins> binary_search_util::binary_search_slice( &self.member_constraints_applied, |applied| applied.member_region_scc,
Code change:
File: reduced: original: Version information Command: Program output:
cc
Some notes dump: the original test fuzzed into this MCVE is . NLLs and do compute the same scopes on that original difference in scopes here is on a somewhat ambiguous case in the current implementation: the loan ultimately flows into via member constraints, not a regular outlives constraint. NLL still computes a scope for it, doesn't since it considers the loan to escape the we ignored the member constraint here and computed the scope anyways, it would result in the same results as NLLs and not trigger the assert. A handful of other tests would then fail of SCC member constraints difference between this test and these other 4 seems to me to be about applied member constraints. That is, in this test the member constraint is likely not applied, so maybe the loan should only be considered to escape via these. We had discussed this very subject before, but thought the distinction didn't matter for the purpose of computing scopes -- maybe we were wrong in these edge cases. That should be a correct fix and should work on these 5 tests. So I'll look into that next.

Related discussion:
text: // Member constraints can also give rise to `'r: 'x` edges that // were not part of the graph initially, so watch out for those. // (But they are extremely rare; this loop is very cold.) <del> for constraint in self.applied_member_constraints(r) { </del> <ins> for constraint in self.applied_member_constraints(self.constraint_sccs.scc(r)) { </ins> let p_c = &self.member_constraints[constraint.member_constraint_index]; let constraint = OutlivesConstraint { sup: r,
Code change:
File: reduced: original: Version information Command: Program output:
cc
Some notes dump: the original test fuzzed into this MCVE is . NLLs and do compute the same scopes on that original difference in scopes here is on a somewhat ambiguous case in the current implementation: the loan ultimately flows into via member constraints, not a regular outlives constraint. NLL still computes a scope for it, doesn't since it considers the loan to escape the we ignored the member constraint here and computed the scope anyways, it would result in the same results as NLLs and not trigger the assert. A handful of other tests would then fail of SCC member constraints difference between this test and these other 4 seems to me to be about applied member constraints. That is, in this test the member constraint is likely not applied, so maybe the loan should only be considered to escape via these. We had discussed this very subject before, but thought the distinction didn't matter for the purpose of computing scopes -- maybe we were wrong in these edge cases. That should be a correct fix and should work on these 5 tests. So I'll look into that next.

Related discussion:
text: self.constraint_sccs.as_ref() } <del> /// Returns whether the given SCC has any member constraints. pub(crate) fn scc_has_member_constraints(&self, scc: ConstraintSccIndex) -> bool { self.member_constraints.indices(scc).next().is_some() } </del> /// Returns whether the given SCC is live at all points: whether the representative is a /// placeholder or a free region. pub(crate) fn scc_is_live_at_all_points(&self, scc: ConstraintSccIndex) -> bool {
Code change:
File: reduced: original: Version information Command: Program output:
cc
Some notes dump: the original test fuzzed into this MCVE is . NLLs and do compute the same scopes on that original difference in scopes here is on a somewhat ambiguous case in the current implementation: the loan ultimately flows into via member constraints, not a regular outlives constraint. NLL still computes a scope for it, doesn't since it considers the loan to escape the we ignored the member constraint here and computed the scope anyways, it would result in the same results as NLLs and not trigger the assert. A handful of other tests would then fail of SCC member constraints difference between this test and these other 4 seems to me to be about applied member constraints. That is, in this test the member constraint is likely not applied, so maybe the loan should only be considered to escape via these. We had discussed this very subject before, but thought the distinction didn't matter for the purpose of computing scopes -- maybe we were wrong in these edge cases. That should be a correct fix and should work on these 5 tests. So I'll look into that next.

Related discussion:
text: /// `-Zpolonius` values, enabling the borrow checker polonius analysis, and which version: legacy, /// or future prototype. <del> #[derive(Clone, Copy, PartialEq, Hash, Debug)] </del> <ins> #[derive(Clone, Copy, PartialEq, Hash, Debug, Default)] </ins> pub enum Polonius { /// The default value: disabled. <ins> #[default] </ins> Off, /// Legacy version, using datalog and the `polonius-engine` crate. Historical value for `-Zpolonius`.
Code change:
File: reduced: original: Version information Command: Program output:
cc
Some notes dump: the original test fuzzed into this MCVE is . NLLs and do compute the same scopes on that original difference in scopes here is on a somewhat ambiguous case in the current implementation: the loan ultimately flows into via member constraints, not a regular outlives constraint. NLL still computes a scope for it, doesn't since it considers the loan to escape the we ignored the member constraint here and computed the scope anyways, it would result in the same results as NLLs and not trigger the assert. A handful of other tests would then fail of SCC member constraints difference between this test and these other 4 seems to me to be about applied member constraints. That is, in this test the member constraint is likely not applied, so maybe the loan should only be considered to escape via these. We had discussed this very subject before, but thought the distinction didn't matter for the purpose of computing scopes -- maybe we were wrong in these edge cases. That should be a correct fix and should work on these 5 tests. So I'll look into that next.

Related discussion:
text: Next, } <del> impl Default for Polonius { fn default() -> Self { Polonius::Off } } </del> impl Polonius { /// Returns whether the legacy version of polonius is enabled pub fn is_legacy_enabled(&self) -> bool {
Code change:
File: reduced: original: Version information Command: Program output:
cc
Some notes dump: the original test fuzzed into this MCVE is . NLLs and do compute the same scopes on that original difference in scopes here is on a somewhat ambiguous case in the current implementation: the loan ultimately flows into via member constraints, not a regular outlives constraint. NLL still computes a scope for it, doesn't since it considers the loan to escape the we ignored the member constraint here and computed the scope anyways, it would result in the same results as NLLs and not trigger the assert. A handful of other tests would then fail of SCC member constraints difference between this test and these other 4 seems to me to be about applied member constraints. That is, in this test the member constraint is likely not applied, so maybe the loan should only be considered to escape via these. We had discussed this very subject before, but thought the distinction didn't matter for the purpose of computing scopes -- maybe we were wrong in these edge cases. That should be a correct fix and should work on these 5 tests. So I'll look into that next.

Related discussion:
text: <ins> error[E0046]: not all trait items implemented, missing: `call` --> $DIR/location-insensitive-scopes-issue-116657.rs:18:1 | LL |     fn call(x: Self) -> Self::Output; |     --------------------------------- `call` from trait ... LL | impl<T: PlusOne> Callable for T { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation error: unconstrained opaque type --> $DIR/location-insensitive-scopes-issue-116657.rs:22:19 | LL |     type Output = impl PlusOne; |                   ^^^^^^^^^^^^ | = note: `Output` must be used in combination with a concrete type within the same impl error[E0700]: hidden type for `impl PlusOne` captures lifetime that does not appear in bounds --> $DIR/location-insensitive-scopes-issue-116657.rs:28:5 | LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne { |         --                     ------------ opaque type defined here |         | |         hidden type `<&'a mut i32 as Callable>::Output` captures the lifetime `'a` as defined here LL |     <&mut i32 as Callable>::call(y) |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | help: to declare that `impl PlusOne` captures `'a`, you can add an explicit `'a` lifetime bound | LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + 'a { |                                             ++++ error: aborting due to 3 previous errors Some errors have detailed explanations: E0046, E0700. For more information about an error, try `rustc --explain E0046`. </ins>
Code change:
File: reduced: original: Version information Command: Program output:
cc
Some notes dump: the original test fuzzed into this MCVE is . NLLs and do compute the same scopes on that original difference in scopes here is on a somewhat ambiguous case in the current implementation: the loan ultimately flows into via member constraints, not a regular outlives constraint. NLL still computes a scope for it, doesn't since it considers the loan to escape the we ignored the member constraint here and computed the scope anyways, it would result in the same results as NLLs and not trigger the assert. A handful of other tests would then fail of SCC member constraints difference between this test and these other 4 seems to me to be about applied member constraints. That is, in this test the member constraint is likely not applied, so maybe the loan should only be considered to escape via these. We had discussed this very subject before, but thought the distinction didn't matter for the purpose of computing scopes -- maybe we were wrong in these edge cases. That should be a correct fix and should work on these 5 tests. So I'll look into that next.

Related discussion:
text: <ins> // This is a non-regression test for issue #116657, where NLL and `-Zpolonius=next` computed // different loan scopes when a member constraint was not ultimately applied. // revisions: nll polonius // [polonius] compile-flags: -Zpolonius=next #![feature(impl_trait_in_assoc_type)] trait Callable { type Output; fn call(x: Self) -> Self::Output; } trait PlusOne {} impl<'a> PlusOne for &'a mut i32 {} impl<T: PlusOne> Callable for T { //[nll]~^ ERROR not all trait items implemented //[polonius]~^^ ERROR not all trait items implemented type Output = impl PlusOne; //[nll]~^ ERROR unconstrained opaque type //[polonius]~^^ ERROR unconstrained opaque type } fn test<'a>(y: &'a mut i32) -> impl PlusOne { <&mut i32 as Callable>::call(y) //[nll]~^ ERROR hidden type for `impl PlusOne` captures lifetime //[polonius]~^^ ERROR hidden type for `impl PlusOne` captures lifetime } fn main() {} </ins>
Code change:
File: auto-reduced (treereduce-rust): original: Version information ` Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Regression in nightly-2021-04-12 finding bors merge commits found 9 bors merge commits in the specified range commit[0] 2021-04-10: Auto merge of - Aaron1011:new-preexp-tests, r=petrochenkov commit[1] 2021-04-10: Auto merge of - Aaron1011:derive-invoc-order, r=petrochenkov commit[2] 2021-04-11: Auto merge of - RalfJung:liballoc-miri, r=Manishearth commit[3] 2021-04-11: Auto merge of - nagisa:nixos-patching-fix, r=Mark-Simulacrum commit[4] 2021-04-11: Auto merge of - JohnTitor:issue-, r=estebank commit[5] 2021-04-11: Auto merge of - Aaron1011:feature/final-preexp-tts, r=petrochenkov commit[6] 2021-04-11: Auto merge of - LingMan:patch-1, r=nagisa commit[7] 2021-04-11: Auto merge of - tweksteen:androidsetmessage, r=m-ou-se commit[8] 2021-04-11: Auto merge of - hyd-dev:uwtable, r=nagisa
claim
Reduced reproduction:
claim

Related discussion:
text: // Parse the arguments, starting out with `self` being allowed... let (mut params, _) = self.parse_paren_comma_seq(|p| { p.recover_diff_marker(); <ins> let snapshot = p.create_snapshot_for_diagnostic(); </ins> let param = p.parse_param_general(req_name, first_param).or_else(|mut e| { e.emit(); let lo = p.prev_token.span; <ins> p.restore_snapshot(snapshot); </ins> // Skip every token until next possible arg or end. p.eat_to_tokens(&[&token::Comma, &token::CloseDelim(Delimiter::Parenthesis)]); // Create a placeholder argument for proper arg count (issue #34264).
Code change:
File: auto-reduced (treereduce-rust): original: Version information ` Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Regression in nightly-2021-04-12 finding bors merge commits found 9 bors merge commits in the specified range commit[0] 2021-04-10: Auto merge of - Aaron1011:new-preexp-tests, r=petrochenkov commit[1] 2021-04-10: Auto merge of - Aaron1011:derive-invoc-order, r=petrochenkov commit[2] 2021-04-11: Auto merge of - RalfJung:liballoc-miri, r=Manishearth commit[3] 2021-04-11: Auto merge of - nagisa:nixos-patching-fix, r=Mark-Simulacrum commit[4] 2021-04-11: Auto merge of - JohnTitor:issue-, r=estebank commit[5] 2021-04-11: Auto merge of - Aaron1011:feature/final-preexp-tts, r=petrochenkov commit[6] 2021-04-11: Auto merge of - LingMan:patch-1, r=nagisa commit[7] 2021-04-11: Auto merge of - tweksteen:androidsetmessage, r=m-ou-se commit[8] 2021-04-11: Auto merge of - hyd-dev:uwtable, r=nagisa
claim
Reduced reproduction:
claim

Related discussion:
text: <ins> #[derive(Debug)] struct Foo { #[cfg(all())] field: fn(($),), //~ ERROR expected pattern, found `$` //~^ ERROR expected pattern, found `$` } fn main() {} </ins>