diff options
author | bors-servo <servo-ops@mozilla.com> | 2021-08-15 16:22:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-15 16:22:59 -0400 |
commit | 08a00a3c359308383c0fab9a500af774f6228f33 (patch) | |
tree | a433eb69316f52d463b268683205e1f305242a3d /python/servo/command_base.py | |
parent | 8b3a49349dd4028f95f0157951d76713551a0ad4 (diff) | |
parent | f305c82494f6cc37fe7cf584829fe200d2731d1e (diff) | |
download | servo-08a00a3c359308383c0fab9a500af774f6228f33.tar.gz servo-08a00a3c359308383c0fab9a500af774f6228f33.zip |
Auto merge of #28573 - Bryce-MW:warnings-fix, r=jdm
Fix compiler warnings
<!-- Please describe your changes on the following line: -->
While working on my other pull request, I noticed that there were a few compiler warnings that are easy to fix since they simply note some deprecated syntax that can be fixed with no semantic difference. I decided to quickly fix them and submit a PR.
There was also one place where an allowance of unsafe code was not being applied to the correct thing in `components/script/dom/cssrulelist.rs`. It was being applied to a macro `unsafe_no_jsmanaged_fields!` which does contain unsafe code. My understanding (and what the compiler warning states) is that applying that annotation to a macro does nothing even if the macro contains unsafe code. So what I have done is moved this annotation to apply to the entire file. I do not know if that is even necessary since the macro definition is in another file. It would be good to know since it would be best to not add extra allowances when they aren't needed. The compiler warning is below if that helps:
```
warning: unused attribute `allow`
--> components/script/dom/cssrulelist.rs:24:1
|
24 | #[allow(unsafe_code)]
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_attributes)]` on by default
note: the built-in attribute `allow` will be ignored, since it's applied to the macro invocation `unsafe_no_jsmanaged_fields`
--> components/script/dom/cssrulelist.rs:25:1
|
25 | unsafe_no_jsmanaged_fields!(RulesSource);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
```
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable) (No issue number)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they fix compiler warnings in a way that does not change semantics except as noted.
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'python/servo/command_base.py')
0 files changed, 0 insertions, 0 deletions