Skip to content

Commit 333a1cd

Browse files
sgrifnikomatsakis
authored andcommitted
Update with response to feedback
1 parent 8978bf6 commit 333a1cd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/librustc/ty/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2158,7 +2158,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
21582158
queries::impl_trait_ref::get(self, DUMMY_SP, id)
21592159
}
21602160

2161-
/// Returns true if the impl is positive and is for a triat which contains
2161+
/// Returns true if the impl is positive and is for a trait which contains
21622162
/// no items
21632163
pub fn impl_always_allowed_to_overlap(self, def_id: DefId) -> bool {
21642164
self.trait_impl_polarity(def_id) == hir::ImplPolarity::Positive

src/test/run-pass/overlap-permitted-for-marker-traits.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@ fn foo<T: MyMarker>(t: T) -> T {
1919

2020
fn main() {
2121
assert_eq!(1, foo(1));
22+
assert_eq!(2.0, foo(2.0));
2223
assert_eq!(vec![1], foo(vec![1]));
2324
}

0 commit comments

Comments
 (0)