We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd5c737 commit ec7cd77Copy full SHA for ec7cd77
src/libstd/repr.rs
@@ -389,6 +389,7 @@ impl<'self> TyVisitor for ReprVisitor<'self> {
389
fn visit_evec_slice(&mut self, mtbl: uint, inner: *TyDesc) -> bool {
390
do self.get::<raw::Slice<()>> |this, s| {
391
this.writer.write(['&' as u8]);
392
+ this.write_mut_qualifier(mtbl);
393
this.write_vec_range(mtbl, s.data, s.len, inner);
394
}
395
@@ -696,6 +697,9 @@ fn test_repr() {
696
697
exact_test(&(10u64, ~"hello"),
698
"(10u64, ~\"hello\")");
699
700
+ exact_test(&(&[1, 2]), "&[1, 2]");
701
+ exact_test(&(&mut [1, 2]), "&mut [1, 2]");
702
+
703
exact_test(&'\'', "'\\''");
704
exact_test(&'"', "'\"'");
705
exact_test(&("'"), "\"'\"");
0 commit comments