instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
rust-lang__cc-rs__703
rust-lang/cc-rs
703
defect
53fb72c87e5769a299f1886ead831901b9c775d6
221cf31152f86ac8ac84cc22874cb54c94af5728
Fix xctoolchain AppleClang to corrrectly use -isysroot
The first commit is #708 but unseparatable. Fix AppleClang build for -apple-darwin to add -isysroot for MacOSX.sdk correctly when cc is under xctoolchain. Becasue `-isysroot` priors to `$SDKROOT` env variable, the original ad-hoc fix is not required anymore.
diff --git a/src/lib.rs b/src/lib.rs index 30ebc9212..ad20d760a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1870,8 +1870,8 @@ impl Build { } } - if target.contains("apple-ios") || target.contains("apple-watchos") { - self.ios_watchos_flags(cmd)?; + if target.contains("-...
5
1
1
[{"id": "G0", "claim": "The macOS minimum-version logic (10.9/10.4 defaults and MACOSX_DEPLOYMENT_TARGET handling) should match the logic in rustc's apple_base.rs.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The author should explain why passing ...
null
rust-lang__cc-rs__709
rust-lang/cc-rs
709
defect
57853c4bf8a89a0f4c9137eb367ac580305c6919
e2afb7be28a04f0e7fbbb0efe7d993fa4d330cd4
detect clang/gcc using --version
This is useful on macos because `gcc` and `cc` is actually `clang`. `gcc` and `cc` were regarded as `clang` even when it was gcc. `m32` and `m64` is not necessary for clang, but also harmless. Do you want to do it as now or want to revert it and change tests run only for gcc?
diff --git a/src/lib.rs b/src/lib.rs index 428b6f9c1..40b3bf423 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1663,6 +1663,16 @@ impl Build { family.add_force_frame_pointer(cmd); } + if !cmd.is_like_msvc() { + if target.contains("i686") || target.contains("i586") { + ...
5
2
1
[{"id": "G0", "claim": "The patch is broken after the rebase, and the author asks the maintainer whether it is still worth fixing.", "category": "correctness", "verdict": "uncertain", "priority": "P0", "scope": "unclear"}, {"id": "G1", "claim": "The fallback warning should read \"cargo-warning:Failed to run: {:?}\" ins...
null
rust-lang__cc-rs__752
rust-lang/cc-rs
752
defect
0fff25ae9aebfc0635e8b2ac719fda4047b4e252
ec19756dbbe3fc0cd107657b4392de18011071be
Add `Build::asm_flag`
The method allows flags to be specified that are only applied to assembly input files, not C files. This is helpful with clang, which only accepts certain assembly options if the input file is asm, not C. Closes https://github.com/rust-lang/cc-rs/issues/751
diff --git a/src/lib.rs b/src/lib.rs index 469b0f893..2fc32be04 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -97,6 +97,7 @@ pub struct Build { flags_supported: Vec<String>, known_flag_support_status: Arc<Mutex<HashMap<String, bool>>>, ar_flags: Vec<String>, + asm_flags: Vec<String>, no_default_fla...
2
2
2
[{"id": "G0", "claim": "The is_asm helper calls to_ascii_lowercase directly on an OsStr, which older Rust versions that the crate supports do not have, so that will need to be fixed.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The asm_flags test'...
null
rust-lang__cc-rs__761
rust-lang/cc-rs
761
defect
0e51f6d8a05548bd9991bfd8184b45b77b261a17
7163670216a2acf02e3760753921412db79d4f71
Add method for specifying C/C++ standard version
As requested by https://github.com/rust-lang/cc-rs/issues/565. Please have a look at the documentation I have included. :) I am not doing any abstraction over special cases like the name for the work-in-progress standard version. It's just the basics. I want to propose adding this to `cc` because: * It shou...
diff --git a/src/lib.rs b/src/lib.rs index 1ebd2cc7a..949cc3f75 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -106,6 +106,7 @@ pub struct Build { cpp_set_stdlib: Option<String>, cuda: bool, cudart: Option<String>, + std: Option<String>, target: Option<String>, host: Option<String>, out_di...
1
1
0
[{"id": "G0", "claim": "The doc comment's statement that `c++11` has less broad support is not entirely true, since `c++11` has the broadest support of the listed standards across compilers and platforms.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__cc-rs__914
rust-lang/cc-rs
914
defect
802399f3fab0820707dc8e562f206594e9a9e1db
51af4a6eedfed22fd79c51e4aee3fe42f8f7edd7
Add new compile_intermediates function.
This new function can be used to just compile the files to a bunch of .o files. It won't create an archive file, nor print any of the cargo link directives. This is meant to be used by rustc to: - Compile the MUSL `crtbegin.c` [here](https://github.com/rust-lang/rust/blob/c5208518faa423b96e6d1fecaa6428a2fa4eb9d1/src...
diff --git a/src/lib.rs b/src/lib.rs index 699facfea..b15354cf6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1131,48 +1131,7 @@ impl Build { }; let dst = self.get_out_dir()?; - let mut objects = Vec::new(); - for file in self.files.iter() { - let obj = if file.has_root() || ...
8
7
1
[{"id": "G0", "claim": "The `self.files.iter().map(|v| &**v)` closure should be extracted into a helper (or an `objects` associated function), because the generic `objects_from_files` is monomorphized twice instead of once.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {...
null
rust-lang__cc-rs__917
rust-lang/cc-rs
917
defect
f17047de579adbe1c3a562b87cf9c0376a8e66cc
40bb482d3a270565735fa0ebe92c9c9425ad78bb
Add `cargo_warnings` config to control the use of the cargo warning instruction
Closes: #916 I couldn't come up with a clean abstraction that doesn't needlessly bloat the code so I decided to keep it simple. Because of the lack of abstraction I'm somewhat concerned about maintainability though, as it might become harder to keep track of the warning instructions. I also found some instances ...
diff --git a/src/lib.rs b/src/lib.rs index 0a5b2ae35..3d2b75aa2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -123,6 +123,7 @@ pub struct Build { archiver: Option<Arc<Path>>, ranlib: Option<Arc<Path>>, cargo_metadata: bool, + cargo_warnings: bool, link_lib_modifiers: Vec<Arc<str>>, pic: Option...
5
5
4
[{"id": "G0", "claim": "With cargo_warnings(false) the compiler messages are still written, only the 'cargo:warning=' prefix is dropped, because the writeln sits outside the `if self.cargo_warnings`; the write should be moved inside the if so disabling warnings discards the output entirely.", "category": "correctness",...
null
rust-lang__chalk__149
rust-lang/chalk
149
defect
3d881b72bfc43aac6b01c9d3ed335bbcfd215c1c
d999f88218ff034efe48accc976197fc79b69ccb
Many lifetimes one universe
This makes it so that `for<'a, 'b>` or `forall<'a, 'b>` are represented as two lifetimes in the same universe, denoted `!1'0` and `!1'1`. This should not change any semantics. The end goal is to later make u-canonicalization more powerful by putting parameters bound in the same binder in a canonical order (e.g. orde...
diff --git a/src/fold.rs b/src/fold.rs index 9ae1c5f5e58..780f4d97529 100644 --- a/src/fold.rs +++ b/src/fold.rs @@ -139,7 +139,7 @@ pub trait UniversalFolder { /// As with `fold_free_universal_ty`, but for lifetimes. fn fold_free_universal_lifetime( &mut self, - universe: UniverseIndex, + ...
3
3
1
[{"id": "G0", "claim": "Types bound by a forall should use the same UniversalIndex representation as lifetimes, so that lifetimes and types are handled in equivalent ways.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The debug output for universal life...
null
rust-lang__chalk__272
rust-lang/chalk
272
defect
ef4564648d3efb056c4cb1588a2d9cf87548694e
2d3a10bf8d56790e5fd51ed908491a5c25997400
Fix coinductive unsoundness
Fixes https://github.com/rust-lang/chalk/issues/248 Now, when a coinductive cycle is found, it is marked in `PositiveCycle` as such. In `pursue_strand`, these are ignored until all other subgoals have been proven. Once that is the case, we can assume that the coinductive cycles are true. With this, I also did a l...
diff --git a/Cargo.lock b/Cargo.lock index 47b16ab40dc..8b58cbef6ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -183,7 +183,6 @@ version = "0.9.0" dependencies = [ "chalk-macros 0.1.1", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "stacker 0.1.5 (registry+https://github.com/rust-la...
7
5
2
[{"id": "G0", "claim": "The doc comment on RecursiveSearchFail reads 'we were trying solve' where it should read 'we were trying to solve'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "pursue_positive_subgoal and pursue_negative_subgoal no lon...
null
rust-lang__chalk__282
rust-lang/chalk
282
defect
ad45fe7d1162ff036140ecbe3d371b8437123209
93e2ca351b8878d8bfa5c1aa4b1f06815345a274
implement `zip_binders` and add some `dyn Trait`/`impl Trait` tests
Fixes #275 r? @tmandry -- or somebody else? cc @kennytm cc @flodiebold -- I *think* this makes dyn Trait in chalk work?
diff --git a/chalk-solve/src/infer/instantiate.rs b/chalk-solve/src/infer/instantiate.rs index 176bb269df3..528b5ff7d99 100644 --- a/chalk-solve/src/infer/instantiate.rs +++ b/chalk-solve/src/infer/instantiate.rs @@ -58,35 +58,33 @@ impl InferenceTable { } /// Variant on `instantiate_in` that takes a `Binde...
6
4
0
[{"id": "G0", "claim": "The binders iterator could be simplified to `(0..self.num_binders).map(make_lifetime)` instead of routing through a named fn pointer.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The test name `dyn_hr_Foo` is unclear and ...
null
rust-lang__chalk__392
rust-lang/chalk
392
defect
154020e4884e7b9fe41a93a6970cfff78783cdcc
b294248b76e341f3def3d71057618bf0aa27d768
Stop leaking truncated goal
Closes #306 As noted in this [Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Contribution.20to.20chalk/near/193511696), it makes sense to return `Floundered` if we were to truncate and avoid leaking the truncated result. If the approach seems fine, I will make sure to change the...
diff --git a/chalk-solve/src/solve/slg.rs b/chalk-solve/src/solve/slg.rs index f49d5e92784..7be415a1d13 100644 --- a/chalk-solve/src/solve/slg.rs +++ b/chalk-solve/src/solve/slg.rs @@ -348,9 +348,7 @@ impl<I: Interner> TruncatingInferenceTable<I> { impl<I: Interner> context::TruncateOps<SlgContext<I>> for Truncating...
2
2
1
[{"id": "G0", "claim": "Change it so we return true in `goal_needs_truncation` when the environment needs truncation, by truncating the whole subgoal (including its environment) rather than only the goal itself.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G1"...
null
rust-lang__chalk__442
rust-lang/chalk
442
defect
ff137d4babef4eb4f49654ee3bfb4f0c88c1b5ff
5549cb26112e1c31e08007ae222a1df369ccba3d
Add raw pointers to `TypeName`
Closes #439. I'm a bit unsure about a few changes here, namely the lowering and the duplication of the `Mutability` enum in both the `ast` module and in `chalk-ir`, which feels a bit messy.
diff --git a/book/src/clauses/well_known_traits.md b/book/src/clauses/well_known_traits.md index 83fd345c099..1898719cfc8 100644 --- a/book/src/clauses/well_known_traits.md +++ b/book/src/clauses/well_known_traits.md @@ -35,6 +35,7 @@ Some common examples of auto traits are `Send` and `Sync`. | scalar types | 📚 ...
1
1
0
[{"id": "G0", "claim": "The raw-ptrs row added to the well-known traits table in the book uses the ASCII letter `o` in several columns where the rest of the table uses the `⚬` symbol, so those entries are inconsistent with the table's convention.", "category": "documentation", "verdict": "supported", "priority": "P2", ...
null
rust-lang__chalk__443
rust-lang/chalk
443
defect
220953b3d3dadb375234e6413f0269d0a74f1c2b
79284721264aed755367da9603091f241f4e5547
Add slice type to `TypeName`
Closes #440.
diff --git a/book/src/clauses/well_known_traits.md b/book/src/clauses/well_known_traits.md index 203905c8723..307877795b4 100644 --- a/book/src/clauses/well_known_traits.md +++ b/book/src/clauses/well_known_traits.md @@ -36,8 +36,8 @@ Some common examples of auto traits are `Send` and `Sync`. | trait objects | ⚬ ...
2
2
1
[{"id": "G0", "claim": "Add explicit tests that slices are not Copy or Clone.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Update the well-known traits table to cover references, since it has no row for refs.", "category": "documentation", "verdict": ...
null
rust-lang__chalk__445
rust-lang/chalk
445
defect
220953b3d3dadb375234e6413f0269d0a74f1c2b
a3dd4de804d5a363d8a6ea23e519b732cf7e6db2
Add ObjectSafe goal and flag
Closes #434
diff --git a/chalk-integration/src/db.rs b/chalk-integration/src/db.rs index 4efab72d515..4e07fae1d7b 100644 --- a/chalk-integration/src/db.rs +++ b/chalk-integration/src/db.rs @@ -156,4 +156,10 @@ impl RustIrDatabase<ChalkIr> for ChalkDatabase { fn interner(&self) -> &ChalkIr { &ChalkIr } + + fn ...
7
7
3
[{"id": "G0", "claim": "Asks whether the new ObjectSafe branch should, per the function documentation's push for precision, check the database and push just the object-safe fact instead of generating all clauses through the general clause-generating function.", "category": "design", "verdict": "supported", "priority": ...
null
rust-lang__chalk__447
rust-lang/chalk
447
defect
26fe3f9523c34de9b06a345687985c17b007bcfa
11d1de07279c17240a1c2f586baaf4cad30b84a4
Mutable references should not be Copy/Clone
Closes #438.
diff --git a/book/src/clauses/well_known_traits.md b/book/src/clauses/well_known_traits.md index 1730e66b906..51eb6808c6c 100644 --- a/book/src/clauses/well_known_traits.md +++ b/book/src/clauses/well_known_traits.md @@ -36,7 +36,8 @@ Some common examples of auto traits are `Send` and `Sync`. | trait objects | ⚬ ...
1
1
1
[{"id": "G0", "claim": "Tests should be added asserting that mutable references are Sized and well formed.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
rust-lang__chalk__462
rust-lang/chalk
462
defect
c0daf935ed5b664e03bb8f2a266b1e2a2e2e8102
b97ed585ccd80634a0ff8a8702748b1336d80438
Issue260
The test is fixed, so it passes when panic is disabled, and then implementation is fixed - so table is not inserted, if it is not initialized correctly. I tried to leave initial style, modifying only what is needed to be modified for this to work. Also @jackh726 mentioned, that maybe after panic there should be t...
diff --git a/chalk-engine/src/logic.rs b/chalk-engine/src/logic.rs index 11eac166711..7678e22d71c 100644 --- a/chalk-engine/src/logic.rs +++ b/chalk-engine/src/logic.rs @@ -6,7 +6,7 @@ use crate::forest::Forest; use crate::hh::HhGoal; use crate::stack::{Stack, StackIndex}; use crate::strand::{CanonicalStrand, Select...
3
3
0
[{"id": "G0", "claim": "push_initial_strands_instantiated could just return the Table (with the mut confined to that function), e.g. via a renamed build_table helper that constructs and returns the table, instead of mutating the forest in place.", "category": "design", "verdict": "supported", "priority": "P2", "scope":...
null
rust-lang__chalk__523
rust-lang/chalk
523
defect
d87cde96c22d2fe86cfa8dd1fb68c1946a4b9960
580d52aa0c880a186c9e769aae202e9ae963def1
Add method to get repr data of an ADT to ChalkDatabase
Hi everyone! I'm Dominik and I'm interested in getting involved in rustc and chalk development. #517 seems like a good place to start and get familiar with the code. With this WIP PR I would like to get some feedback on whether I understood the issue correctly and this is going in the right direction. closes #517
diff --git a/chalk-integration/src/db.rs b/chalk-integration/src/db.rs index b8f5fb7c468..83588149924 100644 --- a/chalk-integration/src/db.rs +++ b/chalk-integration/src/db.rs @@ -11,8 +11,8 @@ use chalk_ir::{ ImplId, InEnvironment, OpaqueTyId, ProgramClause, ProgramClauses, TraitId, Ty, UCanonical, }; use chal...
3
3
3
[{"id": "G0", "claim": "#[repr(C)] and #[repr(packed)] are not mutually exclusive, so repr must not be modelled as an enum that can hold only one of them.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Storing repr data in AdtDatum is what the callbacks ...
null
rust-lang__chalk__524
rust-lang/chalk
524
defect
d87cde96c22d2fe86cfa8dd1fb68c1946a4b9960
f2e62a01b5712bed1556f93779f7027fead00425
Support for ADTs
This is far from complete (I have practically no tests right now and I haven't really attempted any of the refactoring suggested in #506) however I thought this would be a good point to get some eyes on this as it doesn't break any tests... Any thoughts? Will eventually resolve #505
diff --git a/chalk-integration/src/lib.rs b/chalk-integration/src/lib.rs index d3d21a7e0a3..ce159aa45df 100644 --- a/chalk-integration/src/lib.rs +++ b/chalk-integration/src/lib.rs @@ -18,7 +18,7 @@ pub use interner::{Identifier, RawId}; #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum T...
4
4
1
[{"id": "G0", "claim": "The ADT kind representation in the parser AST (a `struct_` bool on `AdtFlags`) should probably be an enum of `Struct`, `Enum`, `Union` instead.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Since WF checks for enums require that ...
null
rust-lang__chalk__538
rust-lang/chalk
538
defect
deebc2d1c5bec4493e2df1567ad4854910cd89d3
00d7793b09ec456fba31fc6d1dbd8d9c54142000
Fix coherence issue with associated types in generic bound
The normalize clause needs to be simplified, and may not be the right approach, but it works. Fixes #515
diff --git a/chalk-solve/src/clauses.rs b/chalk-solve/src/clauses.rs index 7fc248363f8..810a313e2d3 100644 --- a/chalk-solve/src/clauses.rs +++ b/chalk-solve/src/clauses.rs @@ -363,6 +363,13 @@ fn program_clauses_that_could_match<I: Interner>( )?; } + push_clauses_...
2
2
1
[{"id": "G0", "claim": "Building the compatible-normalize clause is long and cumbersome, and there may be a better way to construct it that reuses binders like most other clauses do.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The compatible-...
null
rust-lang__chalk__545
rust-lang/chalk
545
defect
3aff73e32767bd46ac5e6883cd875bfd56dab2c7
a543e4a0aa361a67b11a9fb5fe7bbcba39b861c1
Cleanup function names in `chalk-ir`
Closes #530.
diff --git a/chalk-integration/src/program.rs b/chalk-integration/src/program.rs index 33abafbc86f..a0658453000 100644 --- a/chalk-integration/src/program.rs +++ b/chalk-integration/src/program.rs @@ -385,7 +385,7 @@ impl RustIrDatabase<ChalkIr> for Program { <[_] as CouldMatch<[_]>>::could_match( ...
1
1
0
[{"id": "G0", "claim": "Rename `Binders::without_vars` back to `empty` (or use `dummy` to match rustc), because the reviewer finds `without_vars` unclear.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__chalk__551
rust-lang/chalk
551
defect
c87318e00ea20ac46a3cea26fce6652857604af6
1e9b1af0eac093a36603f70a559998b617cac037
Add type outlives goal
Addresses part of #435. Closes #509.
diff --git a/chalk-integration/src/lowering.rs b/chalk-integration/src/lowering.rs index f1033b2241c..df3ab6bee68 100644 --- a/chalk-integration/src/lowering.rs +++ b/chalk-integration/src/lowering.rs @@ -994,6 +994,14 @@ impl LowerWhereClause<chalk_ir::WhereClause<ChalkIr>> for WhereClause { }, ...
2
2
0
[{"id": "G0", "claim": "Address FIXME #509 in this PR: unsizing to a trait object should also produce a `source_ty: 'lifetime` (TypeOutlives) goal, which the `Unsize` builtin clauses currently lack.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "R...
null
rust-lang__chalk__563
rust-lang/chalk
563
defect
882787aa3d467b87edb5f10c07e74a9600fed89e
ce1f9adc2944c5c2a539a94103a697655fd17b2c
Support where clauses on opaque types
This PR iterates upon #498 to try to address the review comments there.
diff --git a/chalk-integration/src/lowering.rs b/chalk-integration/src/lowering.rs index e49cd9afffe..cc3e213c775 100644 --- a/chalk-integration/src/lowering.rs +++ b/chalk-integration/src/lowering.rs @@ -594,11 +594,11 @@ impl LowerProgram for Program { chalk_ir::VariableKind::...
4
4
0
[{"id": "G0", "claim": "The doc comment on OpaqueTyDatumBound::bounds could be clarified by adding that these are bounds that the hidden type must meet.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The doc comment on the new where_clauses fiel...
null
rust-lang__chalk__573
rust-lang/chalk
573
defect
882787aa3d467b87edb5f10c07e74a9600fed89e
e50996c325d279c7edae5a2608a507634610913a
Refactor and flesh out Fn pointers
Closes #507. This PR does a few things: - Renames `Fn` -> `FnPointer` - Adds ABI to `FnPointer` - Adds support for unsafe functions to both `FnPointer` and `FnDef` - Adds a variadic flag to both `FnPointer` and `FnDef` (cc [this comment](https://github.com/rust-lang/chalk/issues/507#issuecomment-658289067))
diff --git a/chalk-integration/src/lowering.rs b/chalk-integration/src/lowering.rs index e49cd9afffe..4994b8966fa 100644 --- a/chalk-integration/src/lowering.rs +++ b/chalk-integration/src/lowering.rs @@ -1199,6 +1199,8 @@ impl LowerFnDefn for FnDefn { id: fn_def_id, abi: self.abi.lower()?, ...
4
4
1
[{"id": "G0", "claim": "It would be nice to have a more DRY way to encapsulate the fn-def and fn-pointer fn-trait checks, e.g. a common FnSig-like type with an implements_fn_traits method, though this could be left for later.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id...
null
rust-lang__chalk__575
rust-lang/chalk
575
defect
74ab4c73501d83b247f5b64f40b3bdc52f5c7eff
12e932f5acca8c30ba066519622417958d821f0b
Add default `RustIrDatabase::*_name` impls
This adds default implementations for `RustIrDatabase::*_name` methods. They use `Interner::debug_*` methods, and sanitize the output by replacing all non-alphanumeric-ascii chars with `_`. This also removes all custom implementations of these methods, except the one for `Program::assoc_type_name`. We've kept that o...
diff --git a/chalk-integration/src/interner.rs b/chalk-integration/src/interner.rs index 6c1f8c01821..672b982f28c 100644 --- a/chalk-integration/src/interner.rs +++ b/chalk-integration/src/interner.rs @@ -2,9 +2,9 @@ use crate::tls; use chalk_ir::interner::{HasInterner, Interner}; use chalk_ir::{ AdtId, AliasTy,...
5
3
1
[{"id": "G0", "claim": "There is an additional bug related to the WriterState that must be fixed in order to get this change working.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The pull request exposed a bug in how name deduplication is done, wh...
null
rust-lang__chalk__585
rust-lang/chalk
585
defect
5f4d08c5d5a2ad9c52e35267fa5cd6821b407c97
d4a7c836dc87ec7dca482eb49c42718c59ebac9b
.chalk syntax writer: Fix name de-duplication bug
While working on https://github.com/rust-lang/chalk/pull/575, we found a bug in the name de-duplication logic. To ensure we have unique names, we store a mapping between ids and names for ids that don't have unique names. This state was managed inside of `write_items`, but we call `write_items` twice when we output the...
diff --git a/chalk-solve/src/display.rs b/chalk-solve/src/display.rs index ec99d1c9741..4e90d0f48a2 100644 --- a/chalk-solve/src/display.rs +++ b/chalk-solve/src/display.rs @@ -1,4 +1,5 @@ use std::{ + borrow::Borrow, fmt::{Display, Result}, sync::Arc, }; @@ -20,12 +21,12 @@ mod state; mod stub; mod ty...
3
2
0
[{"id": "G0", "claim": "The refactor missed converting two remaining `db.borrow()` calls, in `impls_for_trait` and in `closure_inputs_and_output`, to direct `self.db` calls.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `P: 'a` bound on `wr...
null
rust-lang__chalk__591
rust-lang/chalk
591
defect
6a46a7c41a797c788affb775d428fd6581ad93f0
e8a3401c81c775f01e020df8644553cfed2abacf
Handle well known traits for more types
Adds clauses for well known traits (mostly `Sized`, `Copy`) for more types, including inference vars and bound vars. Also reorganizes tests for well known traits and adds some missing tests. Fixes #590. Fixes #533.
diff --git a/chalk-solve/src/clauses.rs b/chalk-solve/src/clauses.rs index e2f6387d5d2..db54807664e 100644 --- a/chalk-solve/src/clauses.rs +++ b/chalk-solve/src/clauses.rs @@ -313,7 +313,9 @@ fn program_clauses_that_could_match<I: Interner>( } if let Some(well_known) = trait_datum.well_know...
7
7
4
[{"id": "G0", "claim": "The Copy impls for immutable references, raw pointers, scalars and never should not be hard-coded in chalk because they live in libcore.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The stale TODO(areredify) comment about #...
null
rust-lang__chalk__592
rust-lang/chalk
592
defect
a03093141b499bdd22891a4e326b03d521b5aaf8
6024630f686e4d5fc8cb1ece42e4af95b973855c
Turn a few generics into dynamic dispatch.
Fixes #562. r? @jackh726 cc @nikomatsakis
diff --git a/chalk-engine/src/solve.rs b/chalk-engine/src/solve.rs index 3f7c9ed12ce..6c3b0c321de 100644 --- a/chalk-engine/src/solve.rs +++ b/chalk-engine/src/solve.rs @@ -44,7 +44,7 @@ impl<I: Interner> Solver<I> for SLGSolver<I> { &mut self, program: &dyn RustIrDatabase<I>, goal: &UCanonic...
5
5
4
[{"id": "G0", "claim": "The change makes coherence solve all goals through a single long-lived solver instance that keeps state between goals (e.g. placeholders), whereas before a fresh solver was used for each goal, and jackh726 thinks it needs to stay a fresh solver per goal unless convinced otherwise.", "category": ...
null
rust-lang__chalk__601
rust-lang/chalk
601
defect
2b31f5b79bda76917f91b2fdecc3404487d9f588
2fca5affaf164944bd88b44b672611482c30035d
Extern types
Closes #595.
diff --git a/chalk-integration/src/lowering.rs b/chalk-integration/src/lowering.rs index e68ae55ea84..60cd23a0a5b 100644 --- a/chalk-integration/src/lowering.rs +++ b/chalk-integration/src/lowering.rs @@ -2,8 +2,9 @@ use crate::interner::{ChalkFnAbi, ChalkIr}; use chalk_ir::cast::{Cast, Caster}; use chalk_ir::interne...
3
2
0
[{"id": "G0", "claim": "Rename the test function `extern_ty_single` to `extern_ty_lowering`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A follow-up issue should be opened to move the other lowering tests out of tests/lowering/mod so they sit...
null
rust-lang__chalk__603
rust-lang/chalk
603
defect
caa7ab55a9a40ae8fba7d6ba7e7312bc03e2ba55
a1127d92d814aa72e132186f21c5584645f72ac0
Extend well-known traits by Unpin
I read the RFC and didn't find any special rules concerning Unpin, so this one is rather straight-forward. Correct me if I missed something! cc #363
diff --git a/chalk-integration/src/lowering.rs b/chalk-integration/src/lowering.rs index c803ee5ee97..d8a15ab2db7 100644 --- a/chalk-integration/src/lowering.rs +++ b/chalk-integration/src/lowering.rs @@ -2124,6 +2124,7 @@ impl LowerWellKnownTrait for WellKnownTrait { Self::FnMut => rust_ir::WellKnownTrait...
2
1
1
[{"id": "G0", "claim": "Unpin needs to be implemented for all the built-in types: std impls cover scalars, refs and raws, but builtin impls are needed for function pointers, function definitions, arrays, `str`, closures, and slices(?).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "int...
null
rust-lang__chalk__616
rust-lang/chalk
616
defect
2d086ba33f1f7f5e952d5f98fdf862777729da9f
3c126b2fc910608ffd781166381d1658080f1d49
Support fundamental types with multiple type parameters
Closes #615.
diff --git a/chalk-integration/src/lowering.rs b/chalk-integration/src/lowering.rs index 324c25f68f9..aeef609021b 100644 --- a/chalk-integration/src/lowering.rs +++ b/chalk-integration/src/lowering.rs @@ -274,7 +274,7 @@ impl LowerWithEnv for (&AdtDefn, chalk_ir::AdtId<ChalkIr>) { fn lower(&self, env: &Env) -> Low...
1
1
0
[{"id": "G0", "claim": "The fundamental_rule! macro isn't really necessary; instead do an assert if fundamental and just write the goal out in the two places, which would also reduce the asserts from two to one.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}]
null
rust-lang__chalk__639
rust-lang/chalk
639
defect
70e77f1cbe078c378b5253ae799211e19022e3e9
0f2cbba33cb6f59d4a25d3f98396de106af037c0
Add TypeFlags for TyKind in chalk-ir
Closes #627
diff --git a/Cargo.lock b/Cargo.lock index 7398bf263ab..f528c441a68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -211,6 +211,7 @@ dependencies = [ name = "chalk-ir" version = "0.36.0-dev.0" dependencies = [ + "bitflags", "chalk-derive", "lazy_static", ] diff --git a/chalk-integration/src/test_macros.rs b/chalk-i...
8
5
3
[{"id": "G0", "claim": "LifetimeData::Static should add TypeFlags::HAS_FREE_REGIONS in compute_lifetime_flags instead of returning empty flags.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The new empty_substitution! macro should use the existing ...
null
rust-lang__chalk__673
rust-lang/chalk
673
defect
f95e2c20f331529a099c2fef32056ceb61ccc010
9e0da9e24034eca569a7e50be9e4a2f0887d02e1
Generalize with variance
Closes #667
diff --git a/chalk-solve/src/infer.rs b/chalk-solve/src/infer.rs index f65b17edd3d..e3da5d503fd 100644 --- a/chalk-solve/src/infer.rs +++ b/chalk-solve/src/infer.rs @@ -146,6 +146,22 @@ impl<I: Interner> InferenceTable<I> { .map(|p| p.assert_const_ref(interner).clone()) } + pub fn ty_root(&mut se...
2
1
1
[{"id": "G0", "claim": "Unlike the corresponding rustc code, this generalization does not check that the variable can name `universe_index`, though that check may matter only for error messages.", "category": "correctness", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Under the...
null
rust-lang__chalk__681
rust-lang/chalk
681
defect
9332c49e1d3bfd66e54ce0754223a297b081ab95
e0bc5f79acf630f3c6e7f2beb5662f51410664ba
Generate clauses for super traits of opaque bounds
Implements #677 Turns out that push_dyn_ty_impl_clauses can also be used for opaque types.
diff --git a/chalk-ir/src/could_match.rs b/chalk-ir/src/could_match.rs index c70a3be3f04..e0da91e34e2 100644 --- a/chalk-ir/src/could_match.rs +++ b/chalk-ir/src/could_match.rs @@ -33,7 +33,7 @@ where struct MatchZipper<'i, I> { interner: &'i I, db: &'i dyn UnificationDatabase<I>, - ...
3
3
0
[{"id": "G0", "claim": "The push_where_clause_binders helper is too generalized and unclear in purpose, so it should be inlined into the two places it is used.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "When re-inlining, the author should leave a FIX...
null
rust-lang__chalk__685
rust-lang/chalk
685
defect
0b05a81db07ec63052ae2b8e66a84735e59361d1
d4d11081c854fbea2a39a42be133292fdd1338ea
add Movability to Generator
pretty straightforward closes #618 cc #363
diff --git a/chalk-integration/src/lowering.rs b/chalk-integration/src/lowering.rs index 6d98da20937..58d9a392227 100644 --- a/chalk-integration/src/lowering.rs +++ b/chalk-integration/src/lowering.rs @@ -1236,3 +1236,13 @@ impl Lower for Safety { } } } + +impl Lower for Movability { + type Lowered = ...
2
2
2
[{"id": "G0", "claim": "The traits table in the book should be updated to reflect the new Movability/Unpin behaviour of generators before approval.", "category": "documentation", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The pull request also implements auto trait handling...
null
rust-lang__chalk__698
rust-lang/chalk
698
defect
7148968385ae65643ebcff32775a4010723c4246
0179f80cdb8962533cc9c84c8154eaea2a5fc155
Coinduction handling for recursive solver
This PR is meant to address the issue of invalid result in coinductive cycles as described in #399 . It also fixes the two coinduction tests related to that issue (i.e. coinductive_unsound1 and coinductive_multicycle4). As such it is an improved version of #683 as it uses "solution0" described [here](https://hackmd.io/...
diff --git a/book/src/recursive/coinduction.md b/book/src/recursive/coinduction.md index dc9a4d87c26..d3184cfd7cf 100644 --- a/book/src/recursive/coinduction.md +++ b/book/src/recursive/coinduction.md @@ -1,3 +1,73 @@ # Coinduction -TBD \ No newline at end of file +This sub-chapter is meant to describe the current h...
8
8
1
[{"id": "G0", "claim": "The reviewer is not clear why the special-case rollback-and-restart code for coinductive cycles in solve_new_subgoal is needed and questions its presence.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The on-stack cycle check sho...
null
rust-lang__chalk__738
rust-lang/chalk
738
defect
e0c94db8a497eee4ed1f49534fb0714801cb90e8
a723dee06e55b6183a14c2adfa98c1d91ce3c64e
Make DispatchFromDyn a well-known type
The first commit is some minor refactoring. The second commit does the 'obvious' work of making DispatchFromDyn well-known. In order to properly enforce the wf-ness constraints on DispatchFromDyn, Chalk needs to know about one-zst types, that is in the next commit. The final commit finishes the DispatchFromDyn work by ...
diff --git a/chalk-integration/src/lowering.rs b/chalk-integration/src/lowering.rs index 86062afb00c..2803a2694a4 100644 --- a/chalk-integration/src/lowering.rs +++ b/chalk-integration/src/lowering.rs @@ -1134,6 +1134,7 @@ impl Lower for WellKnownTrait { WellKnownTrait::CoerceUnsized => rust_ir::WellKnownT...
6
5
0
[{"id": "G0", "claim": "Fix the typo \"ofa\" in the dispatch_from_dyn_constraint doc comment in wf.rs (it should read \"of a\").", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In add_fn_trait_program_clauses and add_generator_program_clauses, keep...
null
rust-lang__chalk__821
rust-lang/chalk
821
defect
c83151f01e67af489d54423c71b9547cd80e8178
92b4a48ed2dbbd546560ba85720af7d5e954a46e
Implement trait upcasting
This is based on #796, but with a few more changes. cc @Veykril @lowr @jackh726
diff --git a/chalk-solve/src/clauses/builtin_traits/unsize.rs b/chalk-solve/src/clauses/builtin_traits/unsize.rs index 6682735b692..d999a0229d7 100644 --- a/chalk-solve/src/clauses/builtin_traits/unsize.rs +++ b/chalk-solve/src/clauses/builtin_traits/unsize.rs @@ -2,6 +2,7 @@ use std::collections::HashSet; use std::it...
3
2
2
[{"id": "G0", "claim": "The style edition set by this pull request should be unset, because it is churn and the crate must build on stable while the edition is not stable yet.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "unclear"}, {"id": "G1", "claim": "A test is missing where the s...
null
rust-lang__chalk__824
rust-lang/chalk
824
defect
acb96bbe75e069eea8a0bb2bba7f6e0e87671b9a
237ba52bdc4ec8bfbc9f187c7e3a0ac00608246a
Implement built-in supports for `AsyncFn*` traits
Closes #823
diff --git a/Cargo.lock b/Cargo.lock index 285e017d823..8a9777b4633 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "aho-corasick" @@ -61,7 +61,7 @@ checksum = "baf1de43...
1
1
0
[{"id": "G0", "claim": "The workspace-wide version bumps to 0.100.0-dev.0 should be split out of this PR into a separate PR, with the teams and CI changes made so the bump works.", "category": "process", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__chalk__84
rust-lang/chalk
84
defect
4f007d9eb17e42d54247feebf206a1db8e674781
2338af727fd87d24bc28e4b7dbddf3d5ca68342e
Fix `UnselectedProjectionTy` parameters
There were two problems with how `UnselectedProjectionTy` parameters where handled: Firstly, they were in the wrong order with respect to those of `ProjectionTy`, i.e. the bound parameters of the associated type value should come first, *then* the `Self` type should come. For example, given: ```rust trait Foo { ...
diff --git a/chalk-parse/src/parser.lalrpop b/chalk-parse/src/parser.lalrpop index c9428f6a80c..2336f27f15a 100644 --- a/chalk-parse/src/parser.lalrpop +++ b/chalk-parse/src/parser.lalrpop @@ -134,8 +134,8 @@ ProjectionTy: ProjectionTy = { UnselectedProjectionTy: UnselectedProjectionTy = { <ty:TyWithoutFor> "::...
1
1
1
[{"id": "G0", "claim": "The pull request should include a test case for issue #70 (the `UnselectedProjectionTy` parameters fix); the reviewer asks whether one exists.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
rust-lang__compiler-builtins__1011
rust-lang/compiler-builtins
1,011
defect
9c176c24e8b6295e2ba1c35d9713ef9e2d0055fb
aa1fadcc194c3c683c21c3721f6b2c2bd705e099
libm: define and implement `trait NarrowingDiv` for unsigned integer division
New utility in `libm::support`: - `trait NarrowingDiv` for dividing `u2N / uN` when the quotient fits in `uN` - a reasonable implementation of that for primitives up to `u256 / u128` This is the inverse operation of unsigned widening multiplication: ```rust let xy: u256 = u128::widen_mul(x, y); assert_eq!(xy....
diff --git a/libm/src/math/support/big/tests.rs b/libm/src/math/support/big/tests.rs index d54706c72..0c32f445c 100644 --- a/libm/src/math/support/big/tests.rs +++ b/libm/src/math/support/big/tests.rs @@ -3,6 +3,7 @@ use std::string::String; use std::{eprintln, format}; use super::{HInt, MinInt, i256, u256}; +use c...
11
6
0
[{"id": "G0", "claim": "The single-use `impl_narrowing_div_recurse` macro could probably just be a plain impl instead, and no `f256` instantiation should be added.", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Rename `checked_narrowing_div_rem` t...
null
rust-lang__compiler-builtins__1023
rust-lang/compiler-builtins
1,023
defect
82a32c6bd1b82b55de5aea0cddb707732b54855f
984c6e15241f871e2b5b6139ca4e79e3e2b14ad5
implement libm::exp and its variants for i586 with inline assembly
Resolve the severe imprecision (~2%) that is due to inconsistent rounding. Closes: https://github.com/rust-lang/compiler-builtins/issues/1021
diff --git a/libm-test/src/precision.rs b/libm-test/src/precision.rs index c441922d3..968ac7170 100644 --- a/libm-test/src/precision.rs +++ b/libm-test/src/precision.rs @@ -83,6 +83,19 @@ pub fn default_ulp(ctx: &CheckCtx) -> u32 { Bn::Tgamma => 20, }; + // These have a separate implementation on i58...
3
3
0
[{"id": "G0", "claim": "The platform-dependent precision behaviour of `f2xm1` (correctly rounded f32, but f64 may show 1ulp error depending on the hardware) should be documented in a comment near the x87 code, in case anybody runs into it.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope"...
null
rust-lang__compiler-builtins__1061
rust-lang/compiler-builtins
1,061
defect
65624df7f55db9b7b494fbe3aa9dcea0a743eea4
6ccca2f5205c3390036c23b2f07d35e695b5c7fe
Fix generated assembly for the `outline-atomics` feature in Apple AArch64 targets
**Context** See https://github.com/rust-lang/rust/issues/149634#issuecomment-3727134152. Most of the credit goes to https://github.com/tgross35/rust/commit/76a4adc3a28352912188622cfade5ae0b672bcbd. **Summary** The main fixes are (as per [Trevor's comment on the issue in rust-lang/rust](https://github.com/ru...
diff --git a/builtins-test/tests/lse.rs b/builtins-test/tests/lse.rs index 56891be8a..205ed322d 100644 --- a/builtins-test/tests/lse.rs +++ b/builtins-test/tests/lse.rs @@ -1,6 +1,6 @@ #![feature(decl_macro)] // so we can use pub(super) #![feature(macro_metavar_expr_concat)] -#![cfg(all(target_arch = "aarch64", targe...
2
2
2
[{"id": "G0", "claim": "The AArch64 outline-atomics functions return sub-32-bit values zero-extended instead of sign-extended - on the LSE path the sign extension was missing and, once added, sat after `ret` where it never runs - which is why the lse.rs tests fail with -1 != -1 on Apple platforms.", "category": "correc...
null
rust-lang__compiler-builtins__1073
rust-lang/compiler-builtins
1,073
defect
0e5f78cd1963b89bf0b715c810919917e3fdce6b
e2ceadaad9d71c6c53d4ea29e10fdbdd4c93a755
Check for symbols with default visibility in symbol-check
to ensure that compiler-builtins doesn't expose any symbols with default visibility. See discussion on https://github.com/rust-lang/rust/pull/151998
diff --git a/crates/symbol-check/src/main.rs b/crates/symbol-check/src/main.rs index 7d0b7e90a..fdf06a81a 100644 --- a/crates/symbol-check/src/main.rs +++ b/crates/symbol-check/src/main.rs @@ -77,6 +77,7 @@ fn check_paths<P: AsRef<Path>>(paths: &[P]) { verify_no_duplicates(&archive); verify_core_sym...
2
2
2
[{"id": "G0", "claim": "To match up with 2db897ffe717de7fc10738fa2aced1439bdc5e90, the assert!(found_any, \"no symbols found\") should be guarded with `if archive.has_symbol_tables()`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A test for the ne...
null
rust-lang__compiler-builtins__1104
rust-lang/compiler-builtins
1,104
defect
95041e1e733ba895991050c96ef6a863202de2e0
63103a882392e55a8d4645087de033cec4c96dfb
min,max: Add tests for signaling NaNs and update documentation
We do handle signaling NaNs properly, with the exception of raising exceptions as IEEE 754 requires. Add tests to this effect for `fmin`, `fminimum`, `fminimum_num`, and the max variants. ci: allow-many-extensive ci: allow-regressions (hex float printing)
diff --git a/builtins-test/tests/addsub.rs b/builtins-test/tests/addsub.rs index f3334bd0e..410967967 100644 --- a/builtins-test/tests/addsub.rs +++ b/builtins-test/tests/addsub.rs @@ -1,4 +1,4 @@ -#![allow(unused_macros)] +#![allow(unused_macros, unused_features)] #![cfg_attr(f16_enabled, feature(f16))] #![cfg_attr(...
1
1
0
[{"id": "G0", "claim": "The doc comment added to fmaximum.rs (and repeated in the sibling min/max files) misspells \"either argument\" as \"eitt her argument\".", "category": "documentation", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
rust-lang__compiler-builtins__1142
rust-lang/compiler-builtins
1,142
defect
3aaf8016ea1f8b80c637ed9e04e7fe11f8c30bd8
8c6e32d46543d24938aa65d88f68ffa648a7ef46
roundeven: Use an assembly implementation on i586
Add an assembly implementation for roundeven which also works for `rint`, similar to the existing `ceil` and `floor` implementations. This resolves cases where values close to the *.5 boundary would round the incorrect direction, such as -519629176421.49976 (tested in `case_list`). ci: skip-extensive
diff --git a/etc/function-definitions.json b/etc/function-definitions.json index 39f789704..d997ab3e1 100644 --- a/etc/function-definitions.json +++ b/etc/function-definitions.json @@ -824,6 +824,7 @@ "rint": { "sources": [ "libm/src/math/arch/aarch64/rounding.rs", + "libm/src/math...
2
2
0
[{"id": "G0", "claim": "The i586 `rint` should use the current rounding mode instead of saving, setting and restoring the FPU control word, which would also be more efficient.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The helper computing the x...
null
rust-lang__compiler-builtins__164
rust-lang/compiler-builtins
164
defect
f3ace110712bb552ef89deb63d4d0b78cebb45ea
ea74f2afaf5df8543068acb6a55d20587523bdd7
optimize memset and memclr for ARM
This commit optimizes those routines by rewriting them in assembly and performing the memory copying in 32-bit chunks, rather than in 8-bit chunks as it was done before this commit. This assembly implementation is compatible with the ARMv6 and ARMv7 architectures. This change results in a reduction of runtime of ...
diff --git a/src/arm.rs b/src/arm.rs index cf960c5aa..525029024 100755 --- a/src/arm.rs +++ b/src/arm.rs @@ -128,6 +128,87 @@ extern "C" { // FIXME: The `*4` and `*8` variants should be defined as aliases. +// Assembly optimized memclr{4,8} and memset{4,8} +// +// Original source: https://github.com/bobbl/libaeabi...
5
2
1
[{"id": "G0", "claim": "The `u8` test arrays must be made 4-byte aligned (as with all the other instances in the other tests) because the ABI requires the pointers passed to the `*4` routines to be 4-byte aligned.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1"...
null
rust-lang__compiler-builtins__210
rust-lang/compiler-builtins
210
defect
02b3734a5ba6de984eb5a02c50860cc014e58d56
665f268872cdaf5a8cd85aab695ad121c49df887
Implement all the 128-bit operator lang items (Rust 45676 part 2)
https://github.com/rust-lang/rust/pull/46093 declared lang items for all the 128-bit operators. This PR implements them. I was unsure how testing should work, and was unable to get the tests in `/tests` to even compile locally. cc https://github.com/rust-lang/rust/issues/45676 @nagisa @est31
diff --git a/src/int/add.rs b/src/int/add.rs new file mode 100644 index 000000000..4253b64f7 --- /dev/null +++ b/src/int/add.rs @@ -0,0 +1,124 @@ +use int::LargeInt; +use int::Int; + +trait UAdd: LargeInt { + fn uadd(self, other: Self) -> Self { + let (low, carry) = self.low().overflowing_add(other.low()); + ...
1
1
0
[{"id": "G0", "claim": "The 128-bit add tests should be moved out of src/int/add.rs into the tests/ directory, where the repository's other tests live.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__compiler-builtins__222
rust-lang/compiler-builtins
222
defect
0ba07e49264a54cb5bbd4856fcea083bb3fbec15
b40986b10cd28b646864e59132dabedc56bee3cb
Implement comparesf2/comparedf2 intrinsics
These intrinsics are indeed called on soft-float targets, you can verify this by compiling: ```rust #![no_std] fn comparesf2(a: f32, b: f32) -> bool { a > b } fn comparedf2(a: f64, b: f64) -> bool { a > b } ``` and looking at the disassembly. Doesn't come with tests because I'm not about to write *fourteen* of...
diff --git a/README.md b/README.md index 5606ef4c8..a7dabe7b5 100644 --- a/README.md +++ b/README.md @@ -52,16 +52,20 @@ features = ["c"] ## Contributing 1. Pick one or more intrinsics from the [pending list](#progress). -2. Fork this repository -3. Port the intrinsic(s) and their corresponding [unit tests][1] from...
9
7
6
[{"id": "G0", "claim": "At least one test exercising at least a few of the new compare code paths should be written.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "These intrinsics should return i32 rather than bool at the ABI level, for explicitness an...
null
rust-lang__compiler-builtins__232
rust-lang/compiler-builtins
232
defect
266ea0740a5bdd262a38bbd88fb55fc3d2a7a96e
7f92a8ee7ba86b28488f5c6c3d7230818ccc5c67
Fix CI for thumb* targets
Main fix is inside `utest` (implement Termination to avoid ICE) all the rest are minor fixes due to the new `testcrate`. Thumb6m needs some extra fixes: some undefined reference and a panic raised removing assembly implementation not in the list. Still allow failures on TravisCI and keep my `utest` fork for a whi...
diff --git a/build.rs b/build.rs index 594afbded..9eca26c1d 100644 --- a/build.rs +++ b/build.rs @@ -423,13 +423,8 @@ mod c { if llvm_target[0] == "thumbv6m" { sources.remove( &[ - "aeabi_cdcmp", - "aeabi_cfcmp", - "aeabi_dc...
3
3
0
[{"id": "G0", "claim": "The utest changes the testcrate depends on should be available as upstream PRs rather than only on the author's fork.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The mangled-names feature should be enabled by default s...
null
rust-lang__compiler-builtins__365
rust-lang/compiler-builtins
365
defect
7b996ca0fa969199332d703b81fb411d85e5f7c4
9a490cef191c92b7bfd8c3fbc52a7476f600b66e
Use REP MOVSQ/STOSQ on x86_64
Addresses part of #339 (see also https://github.com/rust-osdev/cargo-xbuild/issues/77) The implementations for these functions are quite simple and (on many recent processors) are the fastest way to implement `memcpy`/`memmove`/`memset`. The implementations [in MUSL](https://git.musl-libc.org/cgit/musl/tree/src/stri...
diff --git a/src/lib.rs b/src/lib.rs index db05af5de..d8832713b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(feature = "compiler-builtins", compiler_builtins)] #![feature(abi_unadjusted)] +#![feature(asm)] #![feature(llvm_asm)] #![feature(global_asm)] #![feature(cfg_target_has_atomic)] diff...
8
7
2
[{"id": "G0", "claim": "The repository has no tests for the mem* implementations, so tests for memset/memcmp/etc. should be added as part of this PR.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "No benchmark numbers exist for how these implementations...
null
rust-lang__compiler-builtins__366
rust-lang/compiler-builtins
366
defect
f3846bc05da87b8a71cd1a5a6ff9d980f46b2d0f
5f3c4f71b11586793db1dc3e3abc1ef70c753cd5
Improve `__clzsi2` performance
This was something I originally made for PR 332, but I realized I should PR it by itself so I can remove it from my `specialized-div-rem` crate. As an example, the assembly generation for RISC-V used to be ``` addi a1, zero, 64 beqz a2, .LBB202_2 addi a1, zero, 32 add a0, zero, a2 .LBB202_2: sr...
diff --git a/src/int/mod.rs b/src/int/mod.rs index d73bf6db9..e9481e25b 100644 --- a/src/int/mod.rs +++ b/src/int/mod.rs @@ -309,11 +309,24 @@ intrinsics! { target_pointer_width = "64" ))] pub extern "C" fn __clzsi2(x: usize) -> usize { - // TODO: const this? Would require const-if - //...
6
5
4
[{"id": "G0", "claim": "A microbenchmark should be added so that the PR's claimed `__clzsi2` performance improvement is actually confirmed.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The test suite for `__clzsi2` should be expanded alongside the...
null
rust-lang__compiler-builtins__405
rust-lang/compiler-builtins
405
defect
e6fd1b272ff4cc34810e20126ffe17888a708f39
361c144c9a3667974d224b73ef7b6f2588648232
Optimize memcpy, memmove and memset
Partially addresses #339. (memcmp is not implemented in this PR) This PR modifies the current simple implementation of memcpy, memmove and memset with a more sophisticated one. It will first align dest to machine-word boundary using bytewise copy. If dest and src are co-aligned (i.e. dest and src address are congr...
diff --git a/src/mem/impls.rs b/src/mem/impls.rs index b3eef9901..fe2bd2eb9 100644 --- a/src/mem/impls.rs +++ b/src/mem/impls.rs @@ -1,27 +1,221 @@ +use core::intrinsics::likely; + +const WORD_SIZE: usize = core::mem::size_of::<usize>(); +const WORD_MASK: usize = WORD_SIZE - 1; + +const WORD_COPY_THRESHOLD: usize = if ...
16
9
4
[{"id": "G0", "claim": "The misaligned word-copy reads the whole machine word containing the first copied byte, touching bytes outside the range passed to memcpy/memmove, which the author notes might be UB, bjorn3 warns may crash under M1 exploit protections, and RalfJung states is definitely UB that needs fixing (trac...
null
rust-lang__compiler-builtins__467
rust-lang/compiler-builtins
467
defect
b5065a05b3fdd5fc5836b73617aa867e1e395f7f
f15f99f2f5d8aa79bcc90907de853787adee4f4f
Implement faster memcmp for x86_64
On x86_64 it is generally fast to read unaligned words, so there is no need to do byte-by-byte comparisons. The new algorithm compares 32 bytes at a time. If any doesn't match it effectively does a binary search to find the first non-matching byte. Benchmark results on a Ryzen 7 2700X: <details> <summary><c...
diff --git a/src/lib.rs b/src/lib.rs index 009923d27..acac040be 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,7 @@ #![feature(compiler_builtins)] #![feature(core_ffi_c)] #![feature(core_intrinsics)] +#![feature(inline_const)] #![feature(lang_items)] #![feature(linkage)] #![feature(naked_functions)] diff --g...
2
2
0
[{"id": "G0", "claim": "The two count_ones-based compile-time checks would be much clearer as `const { assert!(mem::size_of::<T>().is_power_of_two()) }`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The shift-based division leaves a call to pa...
null
rust-lang__compiler-builtins__532
rust-lang/compiler-builtins
532
defect
ea1e63c5392f77499de3d77baecb01b34c3761f7
ba44f2e211d2e2e3c1d67cd936b88824d12b13c1
Port outline-atomics to rust
This has a very long history, summarized in https://github.com/rust-lang/rust/issues/109064. This port is a very minimal subset of `aarch64/lse.S` from LLVM's compiler-rt. In particular, it is missing the following: 1. Any form of runtime dispatch between LL/SC and LSE. Determining which version of the intrinsics t...
diff --git a/build.rs b/build.rs index 766dec05d..266cc28bb 100644 --- a/build.rs +++ b/build.rs @@ -1,4 +1,4 @@ -use std::env; +use std::{collections::HashMap, env, sync::atomic::Ordering}; fn main() { println!("cargo:rerun-if-changed=build.rs"); @@ -90,6 +90,61 @@ fn main() { { println!("cargo:r...
6
4
2
[{"id": "G0", "claim": "The anonymous local labels 0: and 1: in the new asm may be parsed as binary literals by some assemblers, so the macro should probably start numbering at 2.", "category": "correctness", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new aarch64 outlin...
null
rust-lang__compiler-builtins__592
rust-lang/compiler-builtins
592
defect
72408497f6646f4dd2e903e00a66083d1f548c5c
adb0dceb7cf55e23267a4daf3e286349894825f1
Add a fix for aarch64-darwin and enable it in CI
This includes two commits: ### Change aarch64_linux module and lse tests to have the same gating Trying to run testcrate on non-linux aarch64 currently hits a compilation error. Make this test linux-only, to be consistent with the `aarch64_linux` module that it depends on. Additionally, enable the `aarch64_li...
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 97d298cf0..57497e050 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,9 @@ jobs: fail-fast: false matrix: include: + - target: aarch64-apple-darwin + os: macos-14 + ...
3
2
2
[{"id": "G0", "claim": "The new cfg gate for `aarch64_linux` in src/lib.rs wrongly includes arm64ec even though ARM64EC only exists on Windows.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The lse test's cfg should also drop arm64ec since it is wi...
null
rust-lang__compiler-builtins__593
rust-lang/compiler-builtins
593
defect
270508143b170d8957d65c6a27936fbcc3bb2629
11c1eedab4b9204b527d6ecfcb5e78bff3179509
Add builtins for `f16`/`f128` float conversions
Adds builtins for float conversions to/from `f16`/`f128`, which will solve rust-lang/rust#123885. I also updated the `README.md` to reflect that `f16`/`f128` are being added to Rust. @tgross35 this should save you some work on #587. I'm not sure if the new functions need the `#[avr_skip]` attribute like the exist...
diff --git a/Cargo.toml b/Cargo.toml index 267f1b950..96e85d7b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,6 +49,10 @@ c = ["cc"] # which use inline assembly and fall back to pure Rust versions (if avalible). no-asm = [] +# Workaround for codegen backends which haven't yet implemented `f16` and +# `f128` suppo...
7
5
2
[{"id": "G0", "claim": "The C build should also be setting `COMPILER_RT_HAS_FLOAT16`, in case compiler-rt's C code winds up being used as a fallback in the future.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request should add the featur...
null
rust-lang__compiler-builtins__603
rust-lang/compiler-builtins
603
defect
a991664446c5d766b58e7f45a589831e8c3abf6e
7d8114fde44777e90d1aec5a51c07fbaed72bd29
Deny warnings in CI and add check-cfg directives
There are currently a lot of warnings printed in CI, a lot of which come from the new check config. Update CI to deny warnings.
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57497e050..970a32ae5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,10 @@ name: CI on: [push, pull_request] +env: + RUSTDOCFLAGS: -Dwarnings + RUSTFLAGS: -Dwarnings + jobs: test: name: Test dif...
3
2
1
[{"id": "G0", "claim": "The `#[allow(unexpected_cfgs)]` attribute on the rustbuild source-extend block could probably be removed, since the `rustbuild` cfg is not used anywhere in rust-lang/rust.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Th...
null
rust-lang__compiler-builtins__613
rust-lang/compiler-builtins
613
defect
449643f5521a376a5c702cb8d61d354020379f8b
568377bfe5956687b81652a4852e123f8cf9b7e1
Add `f128` float to integer conversion functions
Add the following: - `__fixtfsi` - `__fixtfdi` - `__fixtfti` - `__fixunstfsi` - `__fixunstfdi` - `__fixunstfti`
diff --git a/README.md b/README.md index 37d7ab2e6..8233c669c 100644 --- a/README.md +++ b/README.md @@ -239,12 +239,12 @@ These builtins are needed to support `f16` and `f128`, which are in the process - [x] extendhfsf2.c - [x] extendhftf2.c - [x] extendsftf2.c -- [ ] fixtfdi.c -- [ ] fixtfsi.c -- [ ] fixtfti.c -- ...
1
1
1
[{"id": "G0", "claim": "The i586-only condition in testcrate/build.rs is strange because i686 links the same libgcc and should lack `__fixunstfti` too, questioning whether the docker images use different package versions for the two targets.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope"...
null
rust-lang__compiler-builtins__633
rust-lang/compiler-builtins
633
defect
0ccc1bfb962883e04bcce1bdc6a6a3a6ac2d2bbc
500a2761ff406f7c2deb91bda9d75bb15aec5c19
Implement __bswap[si]i2 intrinsics
These can be emitted by gcc, at least if requested specifically via __builtin_bswap{32,64}.
diff --git a/build.rs b/build.rs index 0ecd39911..6793f512b 100644 --- a/build.rs +++ b/build.rs @@ -161,6 +161,8 @@ fn configure_check_cfg() { "__ashlsi3", "__ashrdi3", "__ashrsi3", + "__bswapsi2", + "__bswapdi2", "__clzsi2", "__divdi3", "__divsi3", d...
4
4
1
[{"id": "G0", "claim": "README.md should be updated to mention the new bswap intrinsics.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The bswap tests should use assert_eq! instead of manual if/panic comparisons for both fuzz loops.", "category":...
null
rust-lang__compiler-builtins__665
rust-lang/compiler-builtins
665
defect
3ad4d9c3f4e56637da999cb0effa7b7f87a9c385
b4fa4c341c01f90c9cad93431d5d51120a8d7b78
Configure `f16` and `f128` support for WebAssembly
See: https://github.com/rust-lang/compiler-builtins/pull/652#issuecomment-2282184106 Tested with: <details> <summary>Details</summary> ```console $ curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --target wasm32-unknown-emscripten --default-toolchain nightly-2024-08-11 --component rust-src $ ...
diff --git a/build.rs b/build.rs index 93e323e6b..494fc5273 100644 --- a/build.rs +++ b/build.rs @@ -283,6 +283,13 @@ fn configure_f16_f128(target: &Target) { "powerpc64" if &target.os == "aix" => (true, false), // `f128` crashes <https://github.com/llvm/llvm-project/issues/41838> "sparc" | "...
2
2
2
[{"id": "G0", "claim": "On wasm the `half-precision` target feature has no effect on the ABI LLVM uses for `f16` builtins, so the miscompile still occurs even with the feature enabled — wasm should configure f16 as unsupported and f128 as supported, and the comment should link LLVM issue 96438.", "category": "correctne...
null
rust-lang__compiler-builtins__735
rust-lang/compiler-builtins
735
defect
a09218f1c4d23ffbd97d68f0fefb5feed2469dc5
8cb74d05a80a5782a5377a825d2ddd7b950bf220
Use a C-safe return type for `__rust_[ui]128_*` overflowing intrinsics
Most of our Rust-specific overflowing intrinsics currently return `(i128, bool)`, which is not guaranteed to have a stable ABI. Switch to returning the overflow via a mutable parameter and only directly returning the integer result. `__rust_i128_mulo` now matches the function signature of `__muloti4`, but they do no...
diff --git a/src/int/addsub.rs b/src/int/addsub.rs index e95590d84..1f84e8eb1 100644 --- a/src/int/addsub.rs +++ b/src/int/addsub.rs @@ -66,31 +66,39 @@ intrinsics! { AddSub::add(a,b) } - pub extern "C" fn __rust_i128_addo(a: i128, b: i128) -> (i128, bool) { - a.addo(b) + pub extern "C" fn ...
6
3
0
[{"id": "G0", "claim": "Keep the existing (tuple-returning) `__rust_[ui]128_addo/subo` functions for a while and add new functions with the new ABI, so the cg_clif update and the compiler-builtins update do not have to land at the exact same time.", "category": "design", "verdict": "opposed", "priority": "P1", "scope":...
null
rust-lang__compiler-builtins__770
rust-lang/compiler-builtins
770
defect
f6a6911b7a71615c0ab2ef8875380ee14afb4311
8f1dbb6d4da822151846822d81266fa34a5a92b6
Enable `f16` for LoongArch
r? @tgross35 Tracking issue for f16: https://github.com/rust-lang/rust/issues/116909
diff --git a/configure.rs b/configure.rs index 2bb0f8383..931e96629 100644 --- a/configure.rs +++ b/configure.rs @@ -76,10 +76,8 @@ pub fn configure_f16_f128(target: &Target) { // Selection failure <https://github.com/llvm/llvm-project/issues/50374> "s390x" => false, // Infinite recursion <ht...
2
1
1
[{"id": "G0", "claim": "Add a line in testcrate/build.rs so loongarch64 uses the apfloat fallback, since loongarch has no system f16 version to test against.", "category": "testing", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Try adding loongarch64 to the `__gnu_h2f_ieee`/`...
null
rust-lang__compiler-builtins__791
rust-lang/compiler-builtins
791
defect
7bec089672eb5cd83d7902edd59479527bc9d8d1
458dfab8b66fd59a5e1434561927d94ea6e3b3e8
avr: Skip No More!
This pull request gets rid of all of the `#[avr_skip]`s introduced in the past. > My ~heart~ uC skips, skips, skips, skips, skips, skips ~a beat~ an intrinsic ... Olly Murs, frustrated about having to pull someone's intrinsics when working on AVR firmwares (colorized). Changes here are related to https://githu...
diff --git a/src/float/add.rs b/src/float/add.rs index ef04ddc16..0426c9cc4 100644 --- a/src/float/add.rs +++ b/src/float/add.rs @@ -189,14 +189,12 @@ where } intrinsics! { - #[avr_skip] #[aapcs_on_arm] #[arm_aeabi_alias = __aeabi_fadd] pub extern "C" fn __addsf3(a: f32, b: f32) -> f32 { ...
5
2
0
[{"id": "G0", "claim": "On AVR the comparison intrinsics return i8 via CmpResult, but the reviewer recalls the width should be i16 and asks whether, if i16 is correct, these could just use core::ffi::c_int.", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim"...
null
rust-lang__compiler-builtins__799
rust-lang/compiler-builtins
799
defect
571ce5ff04a1eb54fc5743012ef0b8a2ffbe5f82
842fa948f7bf934551d3321abb8879ece67ee5ff
copy_misaligned_words: avoid out-of-bounds accesses
Fixes https://github.com/rust-lang/compiler-builtins/issues/559 for `memmove`/`memcpy`: load the underaligned prefix and suffix in `copy_*_misaligned_words` in up to 3 separate aligned loads (a 1-byte load, a 2-byte load, and for 64bit targets a 4-byte load), while only doing those loads that are actually inbounds. The...
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 34742e349..b9b1d4e85 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -159,6 +159,20 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache + miri: + name: Miri + run...
6
5
0
[{"id": "G0", "claim": "The copy_forward_misaligned_words loop-end handling should use cfg! instead of #[cfg] so both endianness branches are always type-checked, as suggested for a couple of places.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim":...
null
rust-lang__compiler-builtins__951
rust-lang/compiler-builtins
951
defect
add44a716f996401dac618417519ac31185b80c8
6144db94caf1927eb293fadf56e359640fd7f02f
Eliminate `build.rs`-generated Aarch64 atomic macros
Replace `build.rs` Rust generation with macros, using the unstable `${concat(...)}`. Fixes: https://github.com/rust-lang/compiler-builtins/issues/947
diff --git a/builtins-test/tests/lse.rs b/builtins-test/tests/lse.rs index 53167d98f..0d85228d7 100644 --- a/builtins-test/tests/lse.rs +++ b/builtins-test/tests/lse.rs @@ -1,4 +1,5 @@ #![feature(decl_macro)] // so we can use pub(super) +#![feature(macro_metavar_expr_concat)] #![cfg(all(target_arch = "aarch64", targe...
2
2
0
[{"id": "G0", "claim": "The `${concat(...)}` invocations should have a space after the comma, as in `${concat($name, _relax)}`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The documentation comments that build.rs had for the generated outline...
null
rust-lang__compiler-builtins__976
rust-lang/compiler-builtins
976
defect
8aba4c899ee89eef7fe688cdfa6629ddd56908f9
159feb2627ff8f5dd17aae6578abec49df10b118
implement `floor` and `ceil` in assembly on `i586`
fixes https://github.com/rust-lang/compiler-builtins/issues/837 The assembly is based on - https://github.com/NetBSD/src/blob/20433927938987dd64c8f6aa46904b7aca3fa39e/lib/libm/arch/i387/s_floor.S - https://github.com/NetBSD/src/blob/20433927938987dd64c8f6aa46904b7aca3fa39e/lib/libm/arch/i387/s_ceil.S Which bo...
diff --git a/libm-test/src/precision.rs b/libm-test/src/precision.rs index 32825b15d..3fb8c1b37 100644 --- a/libm-test/src/precision.rs +++ b/libm-test/src/precision.rs @@ -271,18 +271,6 @@ impl MaybeOverride<(f32,)> for SpecialCase { impl MaybeOverride<(f64,)> for SpecialCase { fn check_float<F: Float>(input: ...
6
5
1
[{"id": "G0", "claim": "The end of the naked-asm epilogue in i586.rs is missing a comment and should get one saying \"// Restore esp and ebp and return\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc comment should preserve the original ...
null
rust-lang__crater__378
rust-lang/crater
378
defect
24e9ce010a338045f6fcd6335dc34eb8d9f07930
2119ffdd8e1d5631a21e337bc897066a64cfaa23
Strip missing examples from crates
fix #309 Check existence for every test and example specified in Cargo.toml
diff --git a/local-crates/missing-examples/Cargo.toml b/local-crates/missing-examples/Cargo.toml new file mode 100644 index 000000000..75df9b5fd --- /dev/null +++ b/local-crates/missing-examples/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "missing-examples" +version = "0.1.0" +authors = ["Giacomo Pasini"] + +[depend...
1
1
1
[{"id": "G0", "claim": "test_existance calls table.get(\"name\").unwrap() and will panic on a malformed Cargo.toml whose tables lack a \"name\" key; guard against the missing key instead of assuming valid input.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
rust-lang__crater__391
rust-lang/crater
391
defect
2803f911a55b4ec1fba658fd6009d2177e7e6358
c207b798af1c506087cfb8cb40d631a70af02b43
Add a new `clippy` mode to crater to test lint regressions
Resolves #388. This adds a new mode, `clippy`, to crater which runs clippy on crates (duh :). I had to add some new options to minicrater, as well as change the invocation of `docker create`. See the commit messages for more info. This is still a work in progress as I'd like to add some documentation for the f...
diff --git a/local-crates/clippy-warn/Cargo.toml b/local-crates/clippy-warn/Cargo.toml new file mode 100644 index 000000000..6e9726b87 --- /dev/null +++ b/local-crates/clippy-warn/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "clippy-warn" +version = "0.1.0" +authors = ["Dylan MacKenzie <ecstaticmorse@gmail.com>"] +edi...
2
2
2
[{"id": "G0", "claim": "Do not pass `--security-opt=label:disable` to Docker (untrusted code is run and every bit of extra security helps); store toolchain names on the filesystem percent-encoded with a custom encode set that includes `:` instead.", "category": "security", "verdict": "supported", "priority": "P1", "sco...
null
rust-lang__crater__399
rust-lang/crater
399
defect
73b026c7d3f1a89e4ea1d3615abdd20b435eb324
e271b0ec3d38465f98ff0e25a6bbeb63680332f9
Support crater runs on Windows
Resolves #149. This allows builds to run on [the newly added docker image](https://github.com/rust-lang/crates-build-env/pull/5). In order to run successfully, you'll need to correctly [configure the Docker host](https://github.com/rust-lang/crater/blob/master/docs/agent-machine-setup-windows.md) ~~and `crater`'s `w...
diff --git a/.appveyor.yml b/.appveyor.yml index a5f818455..693ecaeb0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -18,12 +18,15 @@ install: - rustc -V - cargo -V -build: false - branches: only: - auto - try + - master -test_script: +build_script: - cargo build + +test_script: + - ca...
7
4
3
[{"id": "G0", "claim": "Since ring/OpenSSL are only used for HMAC at the moment, the pull request should switch to the dedicated `hmac` and `sha-1` crates (possibly in a separate, smaller PR) instead of un-reverting the switch from ring to OpenSSL.", "category": "design", "verdict": "uncertain", "priority": "P2", "scop...
null
rust-lang__crates.io__11500
rust-lang/crates.io
11,500
defect
0f6c8f97ece7a44975b90990d53cd8273c840687
7204e923a27c8428f487da4bd742f7d3ed33f165
Skip running a job if the crate/version deleted
Fixes #11348. After diffing in I found only 3 jobs that can fail because of deleted data. The rest should be fine.
diff --git a/src/worker/jobs/readmes.rs b/src/worker/jobs/readmes.rs index b3cdfcdf9c5..c971142028d 100644 --- a/src/worker/jobs/readmes.rs +++ b/src/worker/jobs/readmes.rs @@ -9,7 +9,7 @@ use diesel_async::AsyncConnection; use diesel_async::scoped_futures::ScopedFutureExt; use serde::{Deserialize, Serialize}; use s...
4
4
1
[{"id": "G0", "claim": "Fix the misspelled word \"vesion\" in the warning message logged when skipping README rendering.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the trailing comma in the warn! call that logs skipping the default vers...
null
rust-lang__crates.io__11926
rust-lang/crates.io
11,926
defect
30d7c64c79b477166421829ec8512eb4d47b929c
f8c6a54b0a1b81308c8601011d945c15c9103b34
Add API token support to endpoints for managing Trusted Publishing configurations
This PR adds a new `trusted-publishing` endpoint scope to our API tokens. If this scope is used, then the API token can be used to create, list and delete Trusted Publishing configurations for the configured crates. As with the other scopes, a legacy token without any scopes can also be used for the same purpose now. ...
diff --git a/app/controllers/settings/tokens/new.js b/app/controllers/settings/tokens/new.js index e41f7be8d9d..443ee34a698 100644 --- a/app/controllers/settings/tokens/new.js +++ b/app/controllers/settings/tokens/new.js @@ -23,7 +23,7 @@ export default class NewTokenController extends Controller { @tracked scopesIn...
2
2
1
[{"id": "G0", "claim": "The create endpoint's wildcard test should use the unified wildcard scope via CrateScope::try_from(\"*\") instead of \"f*\", to match the other wildcard tests.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The pull request seemi...
null
rust-lang__crates.io__12235
rust-lang/crates.io
12,235
defect
8a548489a1649a54a9f1367e7217c00e26c8de93
88fca94ca722705da4bca8260f1332429b2e0d69
Limit GitHub Trusted Publishing configurations to 5 per crate
Adds a validation to prevent creating more than 5 GitHub Trusted Publishing configurations per crate. When the limit is reached, returns a 400 Bad Request with a clear error message. We shouldn't allow people to create an infinite number of configurations and bloat our database in doing so. This is also relevant to ...
diff --git a/crates/crates_io_database/src/models/trustpub/github_config.rs b/crates/crates_io_database/src/models/trustpub/github_config.rs index c5bb6120ecb..deadf712611 100644 --- a/crates/crates_io_database/src/models/trustpub/github_config.rs +++ b/crates/crates_io_database/src/models/trustpub/github_config.rs @@ ...
2
1
0
[{"id": "G0", "claim": "Two concurrent config-creation requests can both pass the count check before either insert happens, so the 5-per-crate limit can be exceeded (though the reviewer sees this as a minor edge case).", "category": "correctness", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "...
null
rust-lang__crates.io__12792
rust-lang/crates.io
12,792
defect
e2eb8584d4fffda54e6de2b11a609b360dee395a
b7dd83101c1249b2f1edb37688417000adf68561
One migration towards detangling GH
Connects to https://github.com/rust-lang/crates.io/issues/10611. This PR contains ~~a framework for running arbitrary checked-in+reviewed SQL files to do data migrations in a background job,~~ one schema migration to start the process of detangling GitHub oauth info from the users table, and one data migration ~~us...
diff --git a/crates/crates_io_database/src/models/mod.rs b/crates/crates_io_database/src/models/mod.rs index 2e440f0a209..dc3d486081b 100644 --- a/crates/crates_io_database/src/models/mod.rs +++ b/crates/crates_io_database/src/models/mod.rs @@ -18,7 +18,7 @@ pub use self::owner::{CrateOwner, Owner, OwnerKind}; pub use...
11
9
3
[{"id": "G0", "claim": "Running the data migration through a new RunSql background job adds a fourth way of executing SQL whose complexity may not be worth it, since the script only needs database access and could be run directly from the dyno that enqueues the job.", "category": "design", "verdict": "supported", "prio...
null
rust-lang__crates.io__12964
rust-lang/crates.io
12,964
defect
cec727fdabcd29a8c35e05fcb59542fdb0038d59
3328d0f1ef0325a8d665ed7db629dd46ecebe06e
Use oauth_github table for sync_admins
This is a tiny, low-risk way to start using the `oauth_github` table as the source of truth for GitHub IDs in the background process that syncs from the team repo to set the admin flag on users. I volunteer as tribute to be removed (and then readded 🤞🏻 ) as an admin in the team repo to test this out 😁
diff --git a/crates/crates_io_team_repo/src/lib.rs b/crates/crates_io_team_repo/src/lib.rs index 891b1ed518b..bfe5b990c58 100644 --- a/crates/crates_io_team_repo/src/lib.rs +++ b/crates/crates_io_team_repo/src/lib.rs @@ -21,7 +21,7 @@ pub struct Permission { pub struct Person { pub name: String, pub github: ...
1
1
0
[{"id": "G0", "claim": "The multi-query logic could be simplified by doing a gh_id -> user_id lookup for the repo admins first and then working only with users.id afterwards.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__crates.io__13489
rust-lang/crates.io
13,489
defect
8f520adaa8ab39681142e666128f79baffb41873
803015ddf0b7217a7c3b0d1774d3512e37a5f917
jobs/index/archive: Authenticate archive push via GitHub App
The index SSH key used in production is a deploy key for the index repository, so it cannot push to the separate archive repository. Instead of minting a second SSH key plus user account with access to both repos, we registered a GitHub App scoped to both the index and archive repos. This job is the first consumer; the...
diff --git a/Cargo.lock b/Cargo.lock index 1bd8e3df020..720bd9e94f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1430,6 +1430,7 @@ dependencies = [ "crates_io_env_vars", "crates_io_fastly", "crates_io_github", + "crates_io_github_app", "crates_io_index", "crates_io_linecount", "crates_io_markdown", @@ -1667...
2
2
0
[{"id": "G0", "claim": "The test-key constants (`PRIVATE_KEY_PEM`, `PUBLIC_KEY_PEM`) in crates/crates_io_github_app/src/test_keys.rs should be renamed so that automated secret scanning does not alert on them.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1",...
null
rust-lang__ena__29
rust-lang/ena
29
defect
05fcaa3dffb617507b3ed9ac63406c11031e7e96
ffbc9c315e63adb01c15f3f60fceafab922f508c
feat: Allow the UndoLog to be supplied separately
From rust-lang/rust#69218 it was found that keeping an individual undo log for each type that need snapshotting incur noticeable overhead given how often snapshots are done and that they are in many cases empty. By separating the log like this, it is possible to store the undo log and storage separately and only...
diff --git a/src/lib.rs b/src/lib.rs index 233ecf9..aed3524 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,4 +20,5 @@ extern crate log; extern crate dogged; pub mod snapshot_vec; +pub mod undo_log; pub mod unify; diff --git a/src/snapshot_vec.rs b/src/snapshot_vec.rs index 98088b5..235d629 100644 --- a/src/snapsh...
21
20
1
[{"id": "G0", "claim": "The `// FIXME pub` comment on `VarValue` seems dated and should be dropped.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Asks whether any write-up explains how the undo-log machinery is meant to be used, saying that if do...
null
rust-lang__futures-rs__1482
rust-lang/futures-rs
1,482
defect
465ef06d104e2f15098e30971c12642a55a6501b
0e46567cf2f09ffc911611b78e970ed3253e1c32
Remove futures_[un]ordered functions
Closes #1477
diff --git a/futures-util/src/stream/futures_unordered/mod.rs b/futures-util/src/stream/futures_unordered/mod.rs index c9431ccc13..483a968e14 100644 --- a/futures-util/src/stream/futures_unordered/mod.rs +++ b/futures-util/src/stream/futures_unordered/mod.rs @@ -19,7 +19,7 @@ use alloc::sync::{Arc, Weak}; mod abort; ...
2
2
1
[{"id": "G0", "claim": "The iterator types the PR newly exposes at the top level need less generic names (e.g. FuturesUnorderedIterMut).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Remove the `futures_unordered` constructor function and use `FuturesUn...
null
rust-lang__futures-rs__1783
rust-lang/futures-rs
1,783
defect
ab7743d636173903c6c306ae3f156565a3097a3a
d6be2946404ca0ba113e794419d29a16d6abb8ab
Rewrite join! and try_join! as procedural macros
Closes #1782 r? @cramertj
diff --git a/.travis.yml b/.travis.yml index 2441997963..8539a2aa90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -138,6 +138,7 @@ matrix: - cargo check --manifest-path futures-util/Cargo.toml --features io - cargo check --manifest-path futures-util/Cargo.toml --features channel - cargo check...
1
1
1
[{"id": "G0", "claim": "The doc comment on join!/try_join! should say the macros are gated behind the `join-macro` feature of this library rather than `async-await` (or the feature-gated descriptions should be removed in favour of doc(cfg(...))).", "category": "documentation", "verdict": "supported", "priority": "P1", ...
null
rust-lang__futures-rs__1858
rust-lang/futures-rs
1,858
defect
2d718ece36b8f913ce511653701b9fd03af45abc
890bf2209b55ee87b730e3f39aca7c6a21a2af8d
Reduce top-level re-exports
Non-controversial part of #1855 Closes #1854 r? @cramertj
diff --git a/futures-core/src/lib.rs b/futures-core/src/lib.rs index a7d5299fb5..8f85e70204 100644 --- a/futures-core/src/lib.rs +++ b/futures-core/src/lib.rs @@ -20,15 +20,13 @@ compile_error!("The `cfg-target-has-atomic` feature requires the `unstable` feat extern crate alloc; pub mod future; -#[doc(hidden)] pub ...
1
1
1
[{"id": "G0", "claim": "Removing the top-level doc(hidden) trait re-exports (e.g. Future, FusedFuture, TryFuture and the stream equivalents) from futures-core is not uncontroversial, since these imports are used frequently and code relying on them would break.", "category": "design", "verdict": "supported", "priority":...
null
rust-lang__futures-rs__1874
rust-lang/futures-rs
1,874
defect
ddcb8893cf16209be9d9e2403d2e1f3df611c249
eea7b1ecd3eb22800581680497c763a5b87c2906
Improve support for mutable borrows in select! blocks
Improve support for mutable borrows in select! blocks … As reported in #1811 mutable accesses were not allowed inside select! blocks if a Future inside the same expression borrowed it. This is not necessarily required, since the actual polling of the Futures occurs before the result blocks are evaluated. This c...
diff --git a/futures-select-macro/src/lib.rs b/futures-select-macro/src/lib.rs index ffb4776f2f..bd42bff33e 100644 --- a/futures-select-macro/src/lib.rs +++ b/futures-select-macro/src/lib.rs @@ -168,13 +168,25 @@ pub fn select(input: TokenStream) -> TokenStream { .zip(variant_names.iter()) .map(|(expr...
3
3
1
[{"id": "G0", "claim": "Add a comment in the select! macro's path binding branch explaining that futures bound by path must still implement Unpin.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc wording 'a `Future` directly' is unclear and ...
null
rust-lang__futures-rs__2021
rust-lang/futures-rs
2,021
defect
34bca9dc9b55347956592b539ae40a205cd03aa2
87be14ee17c9df60955083b9a469e60092cc5566
`Peek` future for `Peekable` stream
Fix #1871 This pull request is an attempt to provide a sensible peeking behaviour for `Peekable` streams. Instead of exposing wires that resembles `poll` from `Future`, this construction wraps this exposure into a proper `Future`, with pinned borrow of the underlying `Peekable`. It works by swapping out the mutable...
diff --git a/futures-util/src/stream/mod.rs b/futures-util/src/stream/mod.rs index 67bb39962a..a352331bd4 100644 --- a/futures-util/src/stream/mod.rs +++ b/futures-util/src/stream/mod.rs @@ -14,8 +14,8 @@ pub use futures_core::stream::{FusedStream, Stream, TryStream}; mod stream; pub use self::stream::{ Chain, C...
6
6
4
[{"id": "G0", "claim": "Changing the public `poll_peek` signature is a breaking change, so the existing `pub fn poll_peek` should be kept, e.g. by renaming the internal method to something like `do_poll_peek` and having `poll_peek` call it and discard the `Left` value.", "category": "design", "verdict": "supported", "p...
null
rust-lang__futures-rs__2083
rust-lang/futures-rs
2,083
defect
b48eb2e9a9485ef7388edc2f177094a27e08e28b
15f5866921359ff711c0ceb5d695b2737f011f9f
Basic `StreamExt::{flatten_unordered, flat_map_unordered}` impls
Closes #1781 Closes #2378 Basic implementations of `flatten_unordered` and `flat_map_unordered` using `FuturesUnordered` in combination with custom poll state and wakers under the hood. I didn't measure performance but I think it's fast enough. It differs from `flatten` and `flat_map` because it polls stream and in...
diff --git a/futures-util/benches/flatten_unordered.rs b/futures-util/benches/flatten_unordered.rs new file mode 100644 index 0000000000..64d5f9a4e3 --- /dev/null +++ b/futures-util/benches/flatten_unordered.rs @@ -0,0 +1,66 @@ +#![feature(test)] + +extern crate test; +use crate::test::Bencher; + +use futures::channel:...
7
6
4
[{"id": "G0", "claim": "The new flatten_unordered and flat_map_unordered methods should be gated with #[cfg(not(futures_no_atomic_cas))] instead of #[cfg_attr(feature = \"cfg-target-has-atomic\", cfg(target_has_atomic = \"ptr\"))].", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}...
null
rust-lang__futures-rs__2409
rust-lang/futures-rs
2,409
defect
8666a25d8dbb7c3418f3b98946afc4e7e40e8f33
422434ced2ba41c10e320f9785838ca9adb9c87d
Async test function attribute
```rust #[futures_test::test] async fn my_test() { let fut = async { true }; assert!(fut.await); } ``` Resolves #1890
diff --git a/futures-macro/src/executor.rs b/futures-macro/src/executor.rs new file mode 100644 index 0000000000..ac008acc7f --- /dev/null +++ b/futures-macro/src/executor.rs @@ -0,0 +1,27 @@ +use proc_macro::TokenStream; +use quote::quote; + +pub(crate) fn test(_: TokenStream, item: TokenStream) -> TokenStream { + ...
7
6
3
[{"id": "G0", "claim": "The macro is not testing-specific, so maybe it should be called `block_on` and re-exported from `futures_util`/`futures` as well.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The macro should return a compile error when its argume...
null
rust-lang__futures-rs__2410
rust-lang/futures-rs
2,410
defect
f94dd92e3342329b037f80aab4fcbe5322ae5875
d2917e688ecaf02cd8aed15b73168b9adb6ed902
Abortable streams
This PR makes `Abortable` able to work with both futures and streams. Is there a better place to put `Abortable` than `futures-util/src/abortable.rs`? Maybe a `shared/` folder? Resolves #1424
diff --git a/futures-util/src/abortable.rs b/futures-util/src/abortable.rs new file mode 100644 index 0000000000..dd27d092b2 --- /dev/null +++ b/futures-util/src/abortable.rs @@ -0,0 +1,175 @@ +use crate::task::AtomicWaker; +use alloc::sync::Arc; +use core::fmt; +use core::pin::Pin; +use core::sync::atomic::{AtomicBool...
5
4
1
[{"id": "G0", "claim": "Rename the `future` parameter of `Abortable::new` to `task` and use field-init shorthand, as the suggestion block proposes.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "There may be use cases that need to distinguish st...
null
rust-lang__futures-rs__2423
rust-lang/futures-rs
2,423
defect
6699d7ce901a836752f91ef24645a9e898690c30
0aadc4bd3a3f67251eeded0f34b3f29104c2871c
add FuturesUnordered::into_iter, make iter_pin_ref public
- Remove `IterPinRef`. `FuturesUnordered::iter_pin_ref` is private for some reason, so it is impossible to create a `IterPinRef`. Of course, this means that no one used it. I don't see how iterating over a `Pin<&Fut>` is useful anyways. This is still a breaking change however, because the struct was public, albeit impo...
diff --git a/futures-util/src/stream/futures_unordered/iter.rs b/futures-util/src/stream/futures_unordered/iter.rs index 17cde4fac4..59ea28efa6 100644 --- a/futures-util/src/stream/futures_unordered/iter.rs +++ b/futures-util/src/stream/futures_unordered/iter.rs @@ -29,6 +29,47 @@ pub struct IterPinRef<'a, Fut> { /// ...
2
2
1
[{"id": "G0", "claim": "Removing `iter_pin_ref` from the public API is unnecessary — it is fine to keep `iter_pin_ref` public since the API it adds is very small, and if `IterPinRef` is removed from the public API, only its export should be removed, not the type itself.", "category": "design", "verdict": "supported", "...
null
rust-lang__futures-rs__2469
rust-lang/futures-rs
2,469
defect
5c75a1f33d8b14ac7d633458df9ac9fe65448163
4f9c763b727af4a705c2279bfbc1a9e29639d95f
Add `TryStreamExt::try_forward`, remove `TryStream` bound from `StreamExt::forward`
Closes #2004
diff --git a/futures-util/src/stream/mod.rs b/futures-util/src/stream/mod.rs index f0db571413..2512547d69 100644 --- a/futures-util/src/stream/mod.rs +++ b/futures-util/src/stream/mod.rs @@ -63,6 +63,10 @@ pub use self::try_stream::IntoAsyncRead; #[cfg(feature = "alloc")] pub use self::try_stream::{TryBufferUnordered...
5
5
3
[{"id": "G0", "claim": "The `delegate_all!` for `TryForward` in try_stream/mod.rs parameterizes the future with `St::Item` instead of `St::Ok`, so the new `TryForward` auto-trait assertions in auto_traits.rs fail to compile (`*const ()` is not Send/Sync).", "category": "correctness", "verdict": "supported", "priority":...
null
rust-lang__futures-rs__2477
rust-lang/futures-rs
2,477
defect
62d5aa5c0512f2ad0587d26e7f2ee2b4b109469a
54743e6b1061f8b31d4f56101883e20bda391499
async `LineWriter` fix #2131
fix #2131 - [x] finish code - [x] document - [x] add tests This is based on [`std::io::LineWriter`](https://doc.rust-lang.org/src/std/io/buffered/linewriter.rs.html) and its [`LineWriterShim`](https://doc.rust-lang.org/src/std/io/buffered/linewritershim.rs.html) sidekick
diff --git a/futures-util/src/io/buf_writer.rs b/futures-util/src/io/buf_writer.rs index f292b871f1..44d35cee62 100644 --- a/futures-util/src/io/buf_writer.rs +++ b/futures-util/src/io/buf_writer.rs @@ -6,6 +6,7 @@ use pin_project_lite::pin_project; use std::fmt; use std::io::{self, Write}; use std::pin::Pin; +use s...
10
10
10
[{"id": "G0", "claim": "In `flush_if_completed_line` the last buffered byte should be read through the projected field (`this.buffer.buffer()`) instead of the `buffered()` helper on the pinned `self`.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "`...
null
rust-lang__futures-rs__2484
rust-lang/futures-rs
2,484
defect
8be0a590902347cf306d49f83df374000a8dd842
323e6485264d1d12b7ca8fa765945d8ff1f6265d
Correcting overly restrictive lifetimes in vectored IO
The current input lifetimes for `write_vectored` and `write_all_vectored` in `AsyncWriteExt` and `read_vectored` in `AsyncReadExt` are unnecessarily restrictive and disallow otherwise reasonable uses. This change fixes #2483 by relaxing that restriction, making the lifetime of the incoming references independent of the...
diff --git a/futures-util/src/io/mod.rs b/futures-util/src/io/mod.rs index b96223d1c1..6cf8886dd3 100644 --- a/futures-util/src/io/mod.rs +++ b/futures-util/src/io/mod.rs @@ -217,7 +217,10 @@ pub trait AsyncReadExt: AsyncRead { /// /// The returned future will resolve to the number of bytes read once the read...
2
1
1
[{"id": "G0", "claim": "A test should be added to prevent the lifetime fix from being accidentally reverted in the future.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The impl block should be written as impl<'a, W> WriteAllVectored<'a, 'a, W> instead...
null
rust-lang__futures-rs__2527
rust-lang/futures-rs
2,527
defect
b48eb2e9a9485ef7388edc2f177094a27e08e28b
ebf36818828fcc02badaf2c12dcde4724fe4497b
FuturesUnordered: Limit max value of yield_every
**UPDATE(taiki-e): Note that this is not an approach we currently use; see https://github.com/rust-lang/futures-rs/pull/2551 for an approach we currently use.** --- Fixes #2526 The initial version of the https://github.com/rust-lang/futures-rs/pull/2333 did the same thing (https://github.com/tokio-rs/tokio/is...
diff --git a/futures-util/src/stream/futures_unordered/mod.rs b/futures-util/src/stream/futures_unordered/mod.rs index 6918a26b91..e0ac24a8dc 100644 --- a/futures-util/src/stream/futures_unordered/mod.rs +++ b/futures-util/src/stream/futures_unordered/mod.rs @@ -6,6 +6,7 @@ use crate::task::AtomicWaker; use alloc::sy...
2
1
0
[{"id": "G0", "claim": "The poll cap should be a named `const` as in the pre-#2333 implementation, with more documentation copied from that old code.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The test should be adjusted so that it eventuall...
null
rust-lang__futures-rs__2551
rust-lang/futures-rs
2,551
defect
79036bac9eec9a5a03404293b1c378d20af333d9
f6997c37a7d7c6534f25631403cb1cedf974c843
FuturesUnordered: Respect yielding from future
If the future yields, `FuturesUnordered` respects it and yields too. In this patch, if the future waken before it finishes polling, we assume the future yields. This is the approach suggested by @carllerche in [discord](https://discord.com/channels/500028886025895936/500336346770964480/930934906735972413) (if I und...
diff --git a/futures-util/src/stream/futures_unordered/mod.rs b/futures-util/src/stream/futures_unordered/mod.rs index 46a0ae5bde..d176a715a2 100644 --- a/futures-util/src/stream/futures_unordered/mod.rs +++ b/futures-util/src/stream/futures_unordered/mod.rs @@ -6,7 +6,6 @@ use crate::task::AtomicWaker; use alloc::sy...
3
2
1
[{"id": "G0", "claim": "The grammar of the newly added comments should be corrected, e.g. \"the future waken before it\" to \"the future is awoken before it\" and \"the future yields\" to \"the future wanted to explicitly yield\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introd...
null
rust-lang__futures-rs__2577
rust-lang/futures-rs
2,577
defect
8b0f812f53ada0d0aeb74abc32be22ab9dafae05
c21306c882e355c7832beabcdc8f08ae336349d3
`TryFlattenUnordered`
- Basic `TryFlattenUnordered` implementation atop of `FlattenUnordered`. - ~Improve the `FlattenUnordered` interface by removing the `Unpin` requirement for `Self::Item`~. This's much more convenient and I guess it's a good choice for simplification despite a possibly unneeded `Pin<Box<_>>`. - `FusedStream` impl for ...
diff --git a/futures-util/src/future/try_select.rs b/futures-util/src/future/try_select.rs index 15a6216fde..bc282f7db1 100644 --- a/futures-util/src/future/try_select.rs +++ b/futures-util/src/future/try_select.rs @@ -12,6 +12,9 @@ pub struct TrySelect<A, B> { impl<A: Unpin, B: Unpin> Unpin for TrySelect<A, B> {} ...
1
1
1
[{"id": "G0", "claim": "taiki-e felt removing the `Unpin` bound by boxing each inner stream was worse than requiring `Unpin`, since it adds an extra cost when the stream is already `Unpin`.", "category": "performance", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
rust-lang__futures-rs__2591
rust-lang/futures-rs
2,591
defect
c1d71c893cff0b4b79d7340cd07871d4b763a32f
cc4a8cd7bc58aa744863d4c5025f65ab433d4d0c
Add push_front and push_back to FuturesOrdered
- Renamed `push` to `push_back` - Added `push_front`, which pushes a future to the front of the queue. More info [here](https://github.com/rust-lang/futures-rs/issues/2309) (the `push_front` logic is taken from here). We might want to leave `push` as is and just add `push_front` to avoid renaming it. Closes:...
diff --git a/futures-util/src/stream/futures_ordered.rs b/futures-util/src/stream/futures_ordered.rs index f596b3b0e3..bb103640f6 100644 --- a/futures-util/src/stream/futures_ordered.rs +++ b/futures-util/src/stream/futures_ordered.rs @@ -135,11 +135,41 @@ impl<Fut: Future> FuturesOrdered<Fut> { /// This function ...
3
3
1
[{"id": "G0", "claim": "The PR should retain the old `push` method as deprecated instead of removing it, so the change can be backported to futures 0.3.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The deprecation attribute on `push` should carry a not...
null
rust-lang__futures-rs__2673
rust-lang/futures-rs
2,673
defect
2acba12354cf7c7a00dc1253cff9a5827fed2d45
9be822481a186b6fe1cf83fcfba7d622f10caced
Add a `ptr_eq` to `Shared` to test if two `Shared`s share the same underlying future.
`Shared` already has `Arc`'s `strong_count` and `weak_count`. This will make it easier to implement `PartialEq`/`Eq` for structs containing a `Shared`.
diff --git a/futures-util/src/future/future/shared.rs b/futures-util/src/future/future/shared.rs index 21f44e9a68..75ddc9cb89 100644 --- a/futures-util/src/future/future/shared.rs +++ b/futures-util/src/future/future/shared.rs @@ -4,7 +4,9 @@ use futures_core::task::{Context, Poll, Waker}; use slab::Slab; use std::ce...
2
1
0
[{"id": "G0", "claim": "The author wants to be able to hash a `Shared` as well and proposes exposing a pointer value (e.g. a `Shared::as_ptr` returning an opaque pointer) rather than adding `Shared::ptr_eq`.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ...
null
rust-lang__futures-rs__2885
rust-lang/futures-rs
2,885
defect
c507ff833728e2979cf5519fc931ea97308ec876
d9ffb0cab8970ff18fc1d8c568c4c06c4c95f150
Various fixes too make the CI green
Split into semantically separate commits for easier reviewing. compiler warnings: * Fix unexpected `cfg` condition name: ... warnings introduced in Rust 1.80 (see https://blog.rust-lang.org/2024/05/06/check-cfg.html) * io_slice_advance feature is now stable clippy lints: * `missing_const_for_thread_local` lint...
diff --git a/futures-core/src/stream.rs b/futures-core/src/stream.rs index ad5350b795..19114e7dab 100644 --- a/futures-core/src/stream.rs +++ b/futures-core/src/stream.rs @@ -38,15 +38,15 @@ pub trait Stream { /// stream state: /// /// - `Poll::Pending` means that this stream's next value is not ready - ...
1
1
0
[{"id": "G0", "claim": "The futures_sanitizer cfg set globally by CI should be allowed across the workspace via the [workspace.lints] table instead of only in one crate via a build script.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
rust-lang__futures-rs__2886
rust-lang/futures-rs
2,886
defect
99ebe58c2160a8374d0ca6b661519f6b8d8c7158
8b678f40fedd9e4c6c925a6d4a7ebce8adb3c4a1
Fix use after free of task in FuturesUnordered when dropped future panics
Fixes https://github.com/rust-lang/futures-rs/issues/2863
diff --git a/futures-util/src/stream/futures_unordered/mod.rs b/futures-util/src/stream/futures_unordered/mod.rs index 2d4f15158f..d4ee16937d 100644 --- a/futures-util/src/stream/futures_unordered/mod.rs +++ b/futures-util/src/stream/futures_unordered/mod.rs @@ -255,16 +255,6 @@ impl<Fut> FuturesUnordered<Fut> { ...
2
2
2
[{"id": "G0", "claim": "If possible, leak the remaining elements after the first panic has occurred during FuturesUnordered drop, instead of continuing to drop them (which aborts the process if a second future panics while unwinding), matching the behavior of the standard library and crossbeam's queues/channels.", "cat...
null
rust-lang__futures-rs__2940
rust-lang/futures-rs
2,940
defect
3ce1fca7b478d7856836674abefc466e451efbfa
6585500786efa9d0b2da359e9b97d6964a4d8a80
chore: replace all doctest usage of pin_mut with pin
This follows up https://github.com/rust-lang/futures-rs/pull/2929#issuecomment-2746232982 step 1. cc @taiki-e This refers to https://github.com/rust-lang/futures-rs/issues/2924.
diff --git a/futures-test/src/assert.rs b/futures-test/src/assert.rs index f0d58070d8..f1310356c7 100644 --- a/futures-test/src/assert.rs +++ b/futures-test/src/assert.rs @@ -9,15 +9,16 @@ pub fn assert_is_unpin_stream<S: Stream + Unpin>(_: &mut S) {} /// # Examples /// /// ``` +/// use core::pin::pin; +/// /// use...
1
1
1
[{"id": "G0", "claim": "The doctest example in futures-util/src/macros.rs should not be changed to use `pin!` because it is the example for the pin_mut macro itself.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
rust-lang__futures-rs__2947
rust-lang/futures-rs
2,947
defect
89e5d8b26c285c36ce1ac6ec611d540bbf46eebd
2fff86e6b3df1d1c697846bb4b2b4a6418502c95
channel: Add recv
Implements `recv()` for `Receiver` and `UnboundedReceiver`, as discussed in #2944. Since we're reimplementing `Next` anyways we might aswell get the benefits so this returns a new `RecvError` instead of an `Option` for better symmetry with `try_recv` and other crates like [async_channel](https://docs.rs/async-chann...
diff --git a/futures-channel/src/mpsc/mod.rs b/futures-channel/src/mpsc/mod.rs index c5e6badad6..423a06b677 100644 --- a/futures-channel/src/mpsc/mod.rs +++ b/futures-channel/src/mpsc/mod.rs @@ -78,9 +78,11 @@ // happens-before semantics required for the acquire / release semantics used // by the queue structure. +...
3
3
0
[{"id": "G0", "claim": "RecvError's Display message should say the channel is \"empty and closed\" instead of just \"closed\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The doc comments on RecvError and Recv should use proper intra-doc links ...
null
rust-lang__git2-rs__1032
rust-lang/git2-rs
1,032
defect
04427a3a7c96603ba3cfef452fb218b1590b5dbb
3c4b10693893b035721eda82f24e0e5a1834da97
libgit2: Bump to v1.8.1
This PR bumps `libgit2` to v1.8.1, in preparation for #1031. I've bumped `libgit2-sys` to `0.17.0+1.8.1`, but haven't touched the `git2` version since I thought that's better left for the maintainers. I haven't included any new Rust bindings for the new functions (e.g. `git_commit_create_from_stage`). Basically I've...
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1ab0961f1f..c842f1eec5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,6 +31,7 @@ The following steps can be used to update libgit2: can be helpful for seeing what has changed. The project has recently started labeling API and ABI breaking changes w...
2
2
2
[{"id": "G0", "claim": "Representing the C bitfields in git_fetch_options as a bitflags-backed c_uint guesses a compiler-dependent memory layout and may not be ABI-safe, so the PR should work around it (e.g. bits() | reverse_bits()) or use a C wrapper to get/set the fields instead of handling them from Rust.", "categor...
null
rust-lang__git2-rs__1181
rust-lang/git2-rs
1,181
defect
ae91c480f7b32767ccf8179933c47dea501ce939
60d0dc425037ce2cb07c0ee50013168819384ec1
libgit2-sys: More types and functions
This PR adds a few more types and functions to libgit2-sys. The changes should be largely correct but I might've missed a `c_int` somewhere or accidentally forgotten to make it `c_uint` instead of `c_int`. Full list of additions: - `struct git_odb_stream` (previously existed as an empty enum, exposed in git2/odb_b...
diff --git a/libgit2-sys/lib.rs b/libgit2-sys/lib.rs index 7e1ac1e998..a1b640c89a 100644 --- a/libgit2-sys/lib.rs +++ b/libgit2-sys/lib.rs @@ -55,12 +55,83 @@ pub enum git_branch_iterator {} pub enum git_blame {} pub enum git_commit {} pub enum git_config {} -pub enum git_config_iterator {} + +#[repr(C)] +pub struct...
1
1
1
[{"id": "G0", "claim": "`cargo run -p systest` does not compile against the system libgit2 because `git_config_backend_from_string` and `git_config_backend_from_values` are undefined at link time; it only builds with the `libgit2-sys/vendored` feature.", "category": "correctness", "verdict": "supported", "priority": "P...
null
rust-lang__git2-rs__1201
rust-lang/git2-rs
1,201
defect
33af2c44ab9df0daa217ff2fdb06f87d1c73b9db
17e6aa91c89ac68de14079e0ab5369595b09b890
feat(sys): experimental SHA256 OID support
## What this is for Integrate upstream libgit2 experimental SHA256 support in `libgit2-sys`, including * A new unstable Cargo feature `unstable-sha256`, gating all new ABI/API changes. We don't offer any SemVer or stability for this feature, as it is subject to change in upstream. * `libgit2-sys` system lib prob...
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98ed1523a4..d9df2f20d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -36,6 +36,7 @@ jobs: - run: cargo test --locked - run: cargo test --features https,ssh - run: cargo run -p systest + - run: carg...
1
1
0
[{"id": "G0", "claim": "The new standalone `println!(\"cargo:rustc-check-cfg=cfg(libgit2_experimental_sha256)\")` should be merged into the existing multi-line `cargo:rustc-check-cfg` println just above it, since that instruction takes a comma-separated list.", "category": "maintainability", "verdict": "supported", "pr...
null
rust-lang__git2-rs__278
rust-lang/git2-rs
278
defect
264bdae3f48a015091919bf4967173a12125b8ea
99e370fcfc338a99f0c63ddc2cc887cb889fc37e
Expand Bindings
I am currently working on binding almost everything I can. I will try to summarize things as I go. **NOTE**: Highly recommend you squash and merge this when it is ready. ## Changes - `Odb::new`: Constructor for creating an empty ODB. - `Repository::from_odb`: Constructor for creating a repository from an ODB....
diff --git a/libgit2-sys/lib.rs b/libgit2-sys/lib.rs index 926c9839a7..0fc4ca8d30 100644 --- a/libgit2-sys/lib.rs +++ b/libgit2-sys/lib.rs @@ -23,6 +23,8 @@ pub const GIT_STATUS_OPTIONS_VERSION: c_uint = 1; pub const GIT_BLAME_OPTIONS_VERSION: c_uint = 1; pub const GIT_PROXY_OPTIONS_VERSION: c_uint = 1; pub const GI...
3
3
2
[{"id": "G0", "claim": "The new FFI-taking methods (add_disk_alternate's path, OdbBackendHolder::loose/pack's objects_dir, one_pack's index_file, set_namespace_bytes' namespace) should use a CString instead of passing the &str's internal pointer.", "category": "correctness", "verdict": "supported", "priority": "P1", "s...
null