mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
we should not be reporting generic error if there is not a segment to deny
This commit is contained in:
parent
19b528b8a0
commit
b33a0d3292
@ -1106,7 +1106,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
||||
.collect::<String>()
|
||||
),
|
||||
[(only, _)] => only.to_string(),
|
||||
[] => "this type".to_string(),
|
||||
[] => bug!("expected one segment to deny"),
|
||||
};
|
||||
|
||||
let arg_spans: Vec<Span> = segments
|
||||
@ -1136,7 +1136,7 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
|
||||
"s",
|
||||
),
|
||||
[only] => (only.to_string(), ""),
|
||||
[] => unreachable!("expected at least one generic to prohibit"),
|
||||
[] => bug!("expected at least one generic to prohibit"),
|
||||
};
|
||||
let last_span = *arg_spans.last().unwrap();
|
||||
let span: MultiSpan = arg_spans.into();
|
||||
|
Loading…
Reference in New Issue
Block a user