rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
96.87k stars 12.51k forks source link

regression: the size for values of type `T` cannot be known #125195

Open BoxyUwU opened 4 months ago

BoxyUwU commented 4 months ago
[INFO] [stdout] error[E0277]: the size for values of type `T` cannot be known at compilation time
[INFO] [stdout]   --> src/group_map.rs:52:11
[INFO] [stdout]    |
[INFO] [stdout] 51 | pub(crate) fn right_with_right_id<T: PartialEq + ?Sized>(id: ID) -> impl Fn(&RightItem<T>) -> bool {
[INFO] [stdout]    |                                   - this type parameter needs to be `Sized`
[INFO] [stdout] 52 |     move |x| x.id == id
[INFO] [stdout]    |           ^ doesn't have a size known at compile-time
[INFO] [stdout]    |

probably #123531, cc @compiler-errors should be intended breakage

compiler-errors commented 4 months ago

Surprisingly more breakage than #123531, perhaps we should be doing craterbot-test instead of cratebot-check for types PRs. I don't think we should unland the PR tho.

lqd commented 4 months ago

perhaps we should be doing craterbot-test instead of cratebot-check

You mean, because you explicitly want codegen to happen in case there are errors late (or in doctests maybe)? Or because these cases were missing from #123531's results? It seems at least the first error was present (but invisible) in the crater run.

I wonder if cycle_map-0.2.0 may have denied warnings or something. In #123531's results, it failed to build both before and after, but failed with a new E0277. No status change, so it wasn't flagged as a regression:

{       
            "name": "cycle_map-0.2.0",
            "url": "https://crates.io/crates/cycle_map/0.2.0",
            "krate": {
                "Registry": {
                    "name": "cycle_map",
                    "version": "0.2.0"
                }
            },  
            "status": "",
            "res": "build-fail",
            "runs": [
                {
                    "res": "build-fail:compiler-error(unused_imports)",
                    "log": "master%2330840c53f414b753cb08f14620906572f88dda4b/reg/cycle_map-0.2.0"
                },
                {
                    "res": "build-fail:compiler-error(E0277, unused_imports)",
                    "log": "try%2318fb860b8a8e7ca508746882328061d0fe352543/reg/cycle_map-0.2.0"
                }
            ]
        },  

Beta crater runs cap lints while most crater runs don't, maybe doing that would slightly widen the reach in t-types runs.

(I gotta run but I'll check the other crates later today.)

lqd commented 4 months ago
apiraino commented 3 months ago

ok this will be considered as acceptable breaking change and thus will be in the relnotes (comment)

@rustbot label -I-prioritize -needs-triage