Skip to content

Commit 16a979c

Browse files
committed
Remove TypeOrigin::RangeExpression
This variant became unused in rust-lang#30884.
1 parent 9d4d0da commit 16a979c

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/librustc/infer/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,6 @@ pub enum TypeOrigin {
199199
// Computing common supertype of an if expression with no else counter-part
200200
IfExpressionWithNoElse(Span),
201201

202-
// Computing common supertype in a range expression
203-
RangeExpression(Span),
204-
205202
// `where a == b`
206203
EquatePredicate(Span),
207204

@@ -231,7 +228,6 @@ impl TypeOrigin {
231228
},
232229
&TypeOrigin::IfExpression(_) => "if and else have incompatible types",
233230
&TypeOrigin::IfExpressionWithNoElse(_) => "if may be missing an else clause",
234-
&TypeOrigin::RangeExpression(_) => "start and end of range have incompatible types",
235231
&TypeOrigin::EquatePredicate(_) => "equality predicate not satisfied",
236232
&TypeOrigin::MainFunctionType(_) => "main function has wrong type",
237233
&TypeOrigin::StartFunctionType(_) => "start function has wrong type",
@@ -251,7 +247,6 @@ impl TypeOrigin {
251247
&TypeOrigin::MatchExpressionArm(..) => "match arms have compatible types",
252248
&TypeOrigin::IfExpression(_) => "if and else have compatible types",
253249
&TypeOrigin::IfExpressionWithNoElse(_) => "if missing an else returns ()",
254-
&TypeOrigin::RangeExpression(_) => "start and end of range have compatible types",
255250
&TypeOrigin::EquatePredicate(_) => "equality where clause is satisfied",
256251
&TypeOrigin::MainFunctionType(_) => "`main` function has the correct type",
257252
&TypeOrigin::StartFunctionType(_) => "`start` function has the correct type",
@@ -1742,7 +1737,6 @@ impl TypeOrigin {
17421737
TypeOrigin::MatchExpressionArm(match_span, ..) => match_span,
17431738
TypeOrigin::IfExpression(span) => span,
17441739
TypeOrigin::IfExpressionWithNoElse(span) => span,
1745-
TypeOrigin::RangeExpression(span) => span,
17461740
TypeOrigin::EquatePredicate(span) => span,
17471741
TypeOrigin::MainFunctionType(span) => span,
17481742
TypeOrigin::StartFunctionType(span) => span,

0 commit comments

Comments
 (0)