Repository navigation
1.100-beta regression: the trait Parser is not dyn compatible #163834
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Description
Found in https://crater-reports.s3.amazonaws.com/beta-1.100/1.100.0-beta.1/reg/git-url-parse-0.6.0/log.txt
Playground: https://play.rust-lang.org/?version=beta&mode=debug&edition=2024&gist=6a7ae8c4736ab36ccb130ecc41dfd973
Simplified:
// nom 8.0.0
use nom::Parser;
use nom::bytes::complete::{tag, take_while};
use nom::combinator::recognize;
use nom::error::context;
use nom::multi::many1;
use nom::sequence::pair;
pub
fn path_abempty_parser<'url>(
) -> impl Parser<
&'url str,
Output = <dyn Parser<&'url str, Output = &'url str, Error = nom::error::Error<&'url str>> as Parser<
&'url str,
>>::Output,
Error = nom::error::Error<&'url str>,
>{
// Starts with '/' or empty
context(
"Path parser (abempty)",
recognize(many1(pair(tag("/"), take_while(|_| true)))),
)
}Compiles on stable:
Errors on beta:
error[E0038]: the trait `Parser` is not dyn compatible
--> src/lib.rs:11:10
|
11 | ) -> impl Parser<
| __________^
12 | | &'url str,
13 | | Output = <dyn Parser<&'url str, Output = &'url str, Error = nom::error::Error<&'url str>> as Parser<
14 | | &'url str,
15 | | >>::Output,
16 | | Error = nom::error::Error<&'url str>,
17 | | >{
| |_^ `Parser` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> /playground/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nom-8.0.0/src/internal.rs:425:6
|
425 | fn process<OM: OutputMode>(
| ^^^^^^^ the trait is not dyn compatible because method `process` has generic type parametersError on nightly:
error[E0271]: type mismatch resolving `path_abempty_parser<'url>::{opaque#0}<'url> == _`
--> src/lib.rs:11:10
|
11 | ) -> impl Parser<
| __________^
12 | | &'url str,
13 | | Output = <dyn Parser<&'url str, Output = &'url str, Error = nom::error::Error<&'url str>> as Parser<
14 | | &'url str,
15 | | >>::Output,
16 | | Error = nom::error::Error<&'url str>,
17 | | >{
| |_^ types differ
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.Performance or correctness regression from stable to beta.
Activity
cyrgani commentedon Oct 5, 2026
this is expected breakage from #154992
lcnr commentedon Oct 6, 2026
closing as intended breakage