about summary refs log tree commit diff
path: root/tests/ui/parser/bad-char-literals.rs
blob: c3d55d3f7e3bfbb53c98f8ce78ebfe4bff3fe477 (plain)
ofshex dumpascii
0000 2f 2f 20 69 67 6e 6f 72 65 2d 74 69 64 79 2d 63 72 0a 2f 2f 20 69 67 6e 6f 72 65 2d 74 69 64 79 //.ignore-tidy-cr.//.ignore-tidy
0020 2d 74 61 62 0a 0a 66 6e 20 6d 61 69 6e 28 29 20 7b 0a 20 20 20 20 2f 2f 20 74 68 65 73 65 20 6c -tab..fn.main().{.....//.these.l
0040 69 74 65 72 61 6c 73 20 61 72 65 20 6a 75 73 74 20 73 69 6c 6c 79 2e 0a 20 20 20 20 27 27 27 3b iterals.are.just.silly......''';
0060 0a 20 20 20 20 2f 2f 7e 5e 20 45 52 52 4f 52 3a 20 63 68 61 72 61 63 74 65 72 20 63 6f 6e 73 74 .....//~^.ERROR:.character.const
0080 61 6e 74 20 6d 75 73 74 20 62 65 20 65 73 63 61 70 65 64 3a 20 60 27 60 0a 0a 20 20 20 20 2f 2f ant.must.be.escaped:.`'`......//
00a0 20 6e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 69 73 20 61 20 6c 69 74 65 72 61 6c 20 22 5c 6e .note.that.this.is.a.literal."\n
00c0 22 20 62 79 74 65 0a 20 20 20 20 27 0a 27 3b 0a 20 20 20 20 2f 2f 7e 5e 5e 20 45 52 52 4f 52 3a ".byte.....'.';.....//~^^.ERROR:
00e0 20 63 68 61 72 61 63 74 65 72 20 63 6f 6e 73 74 61 6e 74 20 6d 75 73 74 20 62 65 20 65 73 63 61 .character.constant.must.be.esca
0100 70 65 64 3a 20 60 5c 6e 60 0a 0a 20 20 20 20 2f 2f 20 6e 6f 74 65 20 74 68 61 74 20 74 68 69 73 ped:.`\n`......//.note.that.this
0120 20 69 73 20 61 20 6c 69 74 65 72 61 6c 20 22 5c 72 22 20 62 79 74 65 0a 20 20 20 20 27 0d 27 3b .is.a.literal."\r".byte.....'.';
0140 20 2f 2f 7e 20 45 52 52 4f 52 3a 20 63 68 61 72 61 63 74 65 72 20 63 6f 6e 73 74 61 6e 74 20 6d .//~.ERROR:.character.constant.m
0160 75 73 74 20 62 65 20 65 73 63 61 70 65 64 3a 20 60 5c 72 60 0a 0a 20 20 20 20 2f 2f 20 6e 6f 74 ust.be.escaped:.`\r`......//.not
0180 65 20 74 68 61 74 20 74 68 69 73 20 69 73 20 61 20 6c 69 74 65 72 61 6c 20 4e 55 4c 4c 0a 20 20 e.that.this.is.a.literal.NULL...
01a0 20 20 27 2d 00 2d 27 3b 20 2f 2f 7e 20 45 52 52 4f 52 3a 20 63 68 61 72 61 63 74 65 72 20 6c 69 ..'-.-';.//~.ERROR:.character.li
01c0 74 65 72 61 6c 20 6d 61 79 20 6f 6e 6c 79 20 63 6f 6e 74 61 69 6e 20 6f 6e 65 20 63 6f 64 65 70 teral.may.only.contain.one.codep
01e0 6f 69 6e 74 0a 0a 20 20 20 20 2f 2f 20 6e 6f 74 65 20 74 68 61 74 20 74 68 69 73 20 69 73 20 61 oint......//.note.that.this.is.a
0200 20 6c 69 74 65 72 61 6c 20 74 61 62 20 63 68 61 72 61 63 74 65 72 20 68 65 72 65 0a 20 20 20 20 .literal.tab.character.here.....
0220 27 09 27 3b 0a 20 20 20 20 2f 2f 7e 5e 20 45 52 52 4f 52 3a 20 63 68 61 72 61 63 74 65 72 20 63 '.';.....//~^.ERROR:.character.c
0240 6f 6e 73 74 61 6e 74 20 6d 75 73 74 20 62 65 20 65 73 63 61 70 65 64 3a 20 60 5c 74 60 0a 7d 0a onstant.must.be.escaped:.`\t`.}.