@@ -858,9 +858,9 @@ where
858
858
/// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html
859
859
/// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html
860
860
#[ cfg_attr( feature = "inline-more" , inline) ]
861
- pub fn contains < Q : ? Sized > ( & self , value : & Q ) -> bool
861
+ pub fn contains < Q > ( & self , value : & Q ) -> bool
862
862
where
863
- Q : Hash + Equivalent < T > ,
863
+ Q : Hash + Equivalent < T > + ? Sized ,
864
864
{
865
865
self . map . contains_key ( value)
866
866
}
@@ -884,9 +884,9 @@ where
884
884
/// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html
885
885
/// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html
886
886
#[ cfg_attr( feature = "inline-more" , inline) ]
887
- pub fn get < Q : ? Sized > ( & self , value : & Q ) -> Option < & T >
887
+ pub fn get < Q > ( & self , value : & Q ) -> Option < & T >
888
888
where
889
- Q : Hash + Equivalent < T > ,
889
+ Q : Hash + Equivalent < T > + ? Sized ,
890
890
{
891
891
// Avoid `Option::map` because it bloats LLVM IR.
892
892
match self . map . get_key_value ( value) {
@@ -939,9 +939,9 @@ where
939
939
/// assert_eq!(set.len(), 4); // a new "fish" was inserted
940
940
/// ```
941
941
#[ inline]
942
- pub fn get_or_insert_owned < Q : ? Sized > ( & mut self , value : & Q ) -> & T
942
+ pub fn get_or_insert_owned < Q > ( & mut self , value : & Q ) -> & T
943
943
where
944
- Q : Hash + Equivalent < T > + ToOwned < Owned = T > ,
944
+ Q : Hash + Equivalent < T > + ToOwned < Owned = T > + ? Sized ,
945
945
{
946
946
// Although the raw entry gives us `&mut T`, we only return `&T` to be consistent with
947
947
// `get`. Key mutation is "raw" because you're not supposed to affect `Eq` or `Hash`.
@@ -971,9 +971,9 @@ where
971
971
/// assert_eq!(set.len(), 4); // a new "fish" was inserted
972
972
/// ```
973
973
#[ cfg_attr( feature = "inline-more" , inline) ]
974
- pub fn get_or_insert_with < Q : ? Sized , F > ( & mut self , value : & Q , f : F ) -> & T
974
+ pub fn get_or_insert_with < Q , F > ( & mut self , value : & Q , f : F ) -> & T
975
975
where
976
- Q : Hash + Equivalent < T > ,
976
+ Q : Hash + Equivalent < T > + ? Sized ,
977
977
F : FnOnce ( & Q ) -> T ,
978
978
{
979
979
// Although the raw entry gives us `&mut T`, we only return `&T` to be consistent with
@@ -1187,9 +1187,9 @@ where
1187
1187
/// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html
1188
1188
/// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html
1189
1189
#[ cfg_attr( feature = "inline-more" , inline) ]
1190
- pub fn remove < Q : ? Sized > ( & mut self , value : & Q ) -> bool
1190
+ pub fn remove < Q > ( & mut self , value : & Q ) -> bool
1191
1191
where
1192
- Q : Hash + Equivalent < T > ,
1192
+ Q : Hash + Equivalent < T > + ? Sized ,
1193
1193
{
1194
1194
self . map . remove ( value) . is_some ( )
1195
1195
}
@@ -1213,9 +1213,9 @@ where
1213
1213
/// [`Eq`]: https://doc.rust-lang.org/std/cmp/trait.Eq.html
1214
1214
/// [`Hash`]: https://doc.rust-lang.org/std/hash/trait.Hash.html
1215
1215
#[ cfg_attr( feature = "inline-more" , inline) ]
1216
- pub fn take < Q : ? Sized > ( & mut self , value : & Q ) -> Option < T >
1216
+ pub fn take < Q > ( & mut self , value : & Q ) -> Option < T >
1217
1217
where
1218
- Q : Hash + Equivalent < T > ,
1218
+ Q : Hash + Equivalent < T > + ? Sized ,
1219
1219
{
1220
1220
// Avoid `Option::map` because it bloats LLVM IR.
1221
1221
match self . map . remove_entry ( value) {
0 commit comments