about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorphil <uniphil@gmail.com>2019-02-18 00:53:30 -0500
committerphil <uniphil@gmail.com>2019-02-18 11:39:40 -0500
commit3fa3bd8e9464f0bb74366e78972f77353bdd29a5 (patch)
tree077e6e0de60ff5e7647c30ad2ac8b0be89d4eafc /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentcf5d4a1b45dbffad33c5236bfb9620bd9e2014b3 (diff)
downloadrust-3fa3bd8e9464f0bb74366e78972f77353bdd29a5.tar.gz
rust-3fa3bd8e9464f0bb74366e78972f77353bdd29a5.zip
Don't fail for raw string ending in \n
Pass tests for #3778, {print,write}_with_newline false positive

This change guards the lint from checking newlines with a sort of complicated
check to see if it's a raw string. Raw strings shouldn't be newline-checked,
since r"\n" is literally \-n, not a newline. I think it's ok not to check for
_literal_ newlines at the end of raw strings, but maybe that's debatable.

I... don't think this code is that great. I wanted to write the check after
`check_tts`, but that was too late -- raw string type info is lost (or I
couldn't find it). Putting it inside `check_tts` feels heavy-duty and the check
itself feels like a brittle reach possibly into places it shouldn't.

Maybe someone can fix this up :)
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions