Skip to content

Commit 054bbc2

Browse files
authored
Merge pull request #20015 from hvitved/rust/fix-bad-join
Rust: Fix bad join
2 parents e362e53 + d4de56c commit 054bbc2

File tree

1 file changed

+11
-0
lines changed
  • rust/ql/lib/codeql/rust/frameworks/stdlib

1 file changed

+11
-0
lines changed

rust/ql/lib/codeql/rust/frameworks/stdlib/Stdlib.qll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ private class StartswithCall extends Path::SafeAccessCheck::Range, CfgNodes::Met
2929
* [1]: https://doc.rust-lang.org/std/option/enum.Option.html
3030
*/
3131
class OptionEnum extends Enum {
32+
pragma[nomagic]
3233
OptionEnum() { this.getCanonicalPath() = "core::option::Option" }
3334

3435
/** Gets the `Some` variant. */
@@ -41,6 +42,7 @@ class OptionEnum extends Enum {
4142
* [1]: https://doc.rust-lang.org/stable/std/result/enum.Result.html
4243
*/
4344
class ResultEnum extends Enum {
45+
pragma[nomagic]
4446
ResultEnum() { this.getCanonicalPath() = "core::result::Result" }
4547

4648
/** Gets the `Ok` variant. */
@@ -56,6 +58,7 @@ class ResultEnum extends Enum {
5658
* [1]: https://doc.rust-lang.org/core/ops/struct.Range.html
5759
*/
5860
class RangeStruct extends Struct {
61+
pragma[nomagic]
5962
RangeStruct() { this.getCanonicalPath() = "core::ops::range::Range" }
6063

6164
/** Gets the `start` field. */
@@ -71,6 +74,7 @@ class RangeStruct extends Struct {
7174
* [1]: https://doc.rust-lang.org/core/ops/struct.RangeFrom.html
7275
*/
7376
class RangeFromStruct extends Struct {
77+
pragma[nomagic]
7478
RangeFromStruct() { this.getCanonicalPath() = "core::ops::range::RangeFrom" }
7579

7680
/** Gets the `start` field. */
@@ -83,6 +87,7 @@ class RangeFromStruct extends Struct {
8387
* [1]: https://doc.rust-lang.org/core/ops/struct.RangeTo.html
8488
*/
8589
class RangeToStruct extends Struct {
90+
pragma[nomagic]
8691
RangeToStruct() { this.getCanonicalPath() = "core::ops::range::RangeTo" }
8792

8893
/** Gets the `end` field. */
@@ -95,6 +100,7 @@ class RangeToStruct extends Struct {
95100
* [1]: https://doc.rust-lang.org/core/ops/struct.RangeInclusive.html
96101
*/
97102
class RangeInclusiveStruct extends Struct {
103+
pragma[nomagic]
98104
RangeInclusiveStruct() { this.getCanonicalPath() = "core::ops::range::RangeInclusive" }
99105

100106
/** Gets the `start` field. */
@@ -110,6 +116,7 @@ class RangeInclusiveStruct extends Struct {
110116
* [1]: https://doc.rust-lang.org/core/ops/struct.RangeToInclusive.html
111117
*/
112118
class RangeToInclusiveStruct extends Struct {
119+
pragma[nomagic]
113120
RangeToInclusiveStruct() { this.getCanonicalPath() = "core::ops::range::RangeToInclusive" }
114121

115122
/** Gets the `end` field. */
@@ -122,6 +129,7 @@ class RangeToInclusiveStruct extends Struct {
122129
* [1]: https://doc.rust-lang.org/std/future/trait.Future.html
123130
*/
124131
class FutureTrait extends Trait {
132+
pragma[nomagic]
125133
FutureTrait() { this.getCanonicalPath() = "core::future::future::Future" }
126134

127135
/** Gets the `Output` associated type. */
@@ -138,6 +146,7 @@ class FutureTrait extends Trait {
138146
* [1]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
139147
*/
140148
class IteratorTrait extends Trait {
149+
pragma[nomagic]
141150
IteratorTrait() { this.getCanonicalPath() = "core::iter::traits::iterator::Iterator" }
142151

143152
/** Gets the `Item` associated type. */
@@ -154,6 +163,7 @@ class IteratorTrait extends Trait {
154163
* [1]: https://doc.rust-lang.org/std/iter/trait.IntoIterator.html
155164
*/
156165
class IntoIteratorTrait extends Trait {
166+
pragma[nomagic]
157167
IntoIteratorTrait() { this.getCanonicalPath() = "core::iter::traits::collect::IntoIterator" }
158168

159169
/** Gets the `Item` associated type. */
@@ -170,5 +180,6 @@ class IntoIteratorTrait extends Trait {
170180
* [1]: https://doc.rust-lang.org/std/string/struct.String.html
171181
*/
172182
class StringStruct extends Struct {
183+
pragma[nomagic]
173184
StringStruct() { this.getCanonicalPath() = "alloc::string::String" }
174185
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy