aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-fnparam.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-10-04 09:26:20 +0000
committerGitHub <noreply@github.com>2021-10-04 09:26:20 +0000
commit99c28309d3553346d4f0337dbae49f4a8e48da01 (patch)
tree6eec1dda4eccc0f90d6c5bf00158db8a3763661b /gcc/rust/backend/rust-compile-fnparam.h
parente0b9673a7ccad74706ed744bb882786b2fbaddf0 (diff)
parent65d06d56e8201e365e60adeef9121386a626a203 (diff)
parent23475a8131d2bd284758bcab85fa1c5bb98f1010 (diff)
downloadgcc-99c28309d3553346d4f0337dbae49f4a8e48da01.zip
gcc-99c28309d3553346d4f0337dbae49f4a8e48da01.tar.gz
gcc-99c28309d3553346d4f0337dbae49f4a8e48da01.tar.bz2
Merge #698 #701
698: Implement Byte Strings r=philberty a=philberty Byte strings are not str's they are arrays of [u8; capacity], this preserves their type guarantees as a byte string. This patch merges work from Mark to implement the correct typing, the missing piece was that each implicit type needed its own implicit id, other wise their is a loop in looking up the covariant types. Fixes #697 Co-authored-by: Mark Wielaard <mark@klomp.org> 701: Fix lexer to not produce bad unicode escape values r=philberty a=CohenArthur There were a couple of issues in the lexer unicode escape code. Unicode escape sequences must always start with an opening curly bracket (and end with a closing one). Underscores are not allowed as starting character. And the produced values must be unicode scalar values, which excludes surrogate values (D800 to DFFF) or values larger than 10FFFF. Also try to recover more gracefully from errors by trying to skip past any bad characters to the end of the escape sequence. Test all of the above in a new testcase unicode_escape.rs. Patch: https://git.sr.ht/~mjw/gccrs/commit/unicode_escape Mail: https://gcc.gnu.org/pipermail/gcc-rust/2021-October/000231.html Co-authored-by: Philip Herron <philip.herron@embecosm.com> Co-authored-by: Mark Wielaard <mark@klomp.org>