Skip to content

Commit 68a783a

Browse files
committed
Remove String impls and fix for make tidy
1 parent 63a9bd5 commit 68a783a

File tree

3 files changed

+1
-55
lines changed

3 files changed

+1
-55
lines changed

src/libcore/ops.rs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -860,13 +860,6 @@ impl fmt::Show for FullRange {
860860
}
861861
}
862862

863-
#[unstable = "API still in development"]
864-
impl fmt::String for FullRange {
865-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
866-
fmt::String::fmt("..", fmt)
867-
}
868-
}
869-
870863
/// A (half-open) range which is bounded at both ends.
871864
#[derive(Copy, PartialEq, Eq)]
872865
#[lang="range"]
@@ -925,20 +918,6 @@ impl<Idx: fmt::Show> fmt::Show for Range<Idx> {
925918
write!(fmt, "{:?}..{:?}", self.start, self.end)
926919
}
927920
}
928-
#[cfg(stage0)]
929-
#[unstable = "API still in development"]
930-
impl<Idx: fmt::String + fmt::Show> fmt::String for Range<Idx> {
931-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
932-
write!(fmt, "{}..{}", self.start, self.end)
933-
}
934-
}
935-
#[cfg(not(stage0))]
936-
#[unstable = "API still in development"]
937-
impl<Idx: fmt::String> fmt::String for Range<Idx> {
938-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
939-
write!(fmt, "{}..{}", self.start, self.end)
940-
}
941-
}
942921

943922
/// A range which is only bounded below.
944923
#[derive(Copy, PartialEq, Eq)]
@@ -969,21 +948,6 @@ impl<Idx: fmt::Show> fmt::Show for RangeFrom<Idx> {
969948
}
970949
}
971950

972-
#[cfg(stage0)]
973-
#[unstable = "API still in development"]
974-
impl<Idx: fmt::String + fmt::Show> fmt::String for RangeFrom<Idx> {
975-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
976-
write!(fmt, "{}..", self.start)
977-
}
978-
}
979-
#[cfg(not(stage0))]
980-
#[unstable = "API still in development"]
981-
impl<Idx: fmt::String> fmt::String for RangeFrom<Idx> {
982-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
983-
write!(fmt, "{}..", self.start)
984-
}
985-
}
986-
987951
/// A range which is only bounded above.
988952
#[derive(Copy, PartialEq, Eq)]
989953
#[lang="range_to"]
@@ -1000,21 +964,6 @@ impl<Idx: fmt::Show> fmt::Show for RangeTo<Idx> {
1000964
}
1001965
}
1002966

1003-
#[cfg(stage0)]
1004-
#[unstable = "API still in development"]
1005-
impl<Idx: fmt::String + fmt::Show> fmt::String for RangeTo<Idx> {
1006-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1007-
write!(fmt, "..{}", self.end)
1008-
}
1009-
}
1010-
#[cfg(not(stage0))]
1011-
#[unstable = "API still in development"]
1012-
impl<Idx: fmt::String> fmt::String for RangeTo<Idx> {
1013-
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
1014-
write!(fmt, "..{}", self.end)
1015-
}
1016-
}
1017-
1018967

1019968
/// The `Deref` trait is used to specify the functionality of dereferencing
1020969
/// operations like `*v`.

src/libsyntax/parse/parser.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2894,7 +2894,6 @@ impl<'a> Parser<'a> {
28942894
let cur_prec = operator_prec(cur_op);
28952895
if cur_prec > min_prec {
28962896
self.bump();
2897-
// TODO
28982897
let expr = self.parse_prefix_expr();
28992898
let rhs = self.parse_more_binops(expr, cur_prec);
29002899
let lhs_span = lhs.span;
@@ -2956,13 +2955,11 @@ impl<'a> Parser<'a> {
29562955
let assign_op = self.mk_assign_op(aop, lhs, rhs);
29572956
self.mk_expr(span.lo, rhs_span.hi, assign_op)
29582957
}
2959-
// TODO
29602958
// A range expression, either `expr..expr` or `expr..`.
29612959
token::DotDot if !self.restrictions.contains(RESTRICTION_NO_DOTS) => {
29622960
self.bump();
29632961

29642962
let opt_end = if self.token.can_begin_expr() {
2965-
// TODO only use of RES...DOT
29662963
let end = self.parse_expr_res(RESTRICTION_NO_DOTS);
29672964
Some(end)
29682965
} else {

src/test/run-pass/ranges-precedence.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn main() {
2929

3030
let x = 1+3..4;
3131
assert!(x == (4..4));
32-
32+
3333
let a = Foo { foo: 3 };
3434
let x = a.foo..a.bar();
3535
assert!(x == (3..5));

0 commit comments

Comments
 (0)